org.objectweb.kilim.description
Class Property

java.lang.Object
  extended byorg.objectweb.kilim.description.TemplateElementImpl
      extended byorg.objectweb.kilim.description.BasicNamedElementImpl
          extended byorg.objectweb.kilim.description.Property
All Implemented Interfaces:
BasicElement, BasicNamedElement, java.lang.Cloneable, NamedElement, TemplateElement

public class Property
extends BasicNamedElementImpl

Author:
horn Describes a Kilim Template Property. Provides the basic primitive types & their values.

Field Summary
private  boolean isBound
           
private  java.lang.Class type
           
private static java.lang.Class[] TYPE_CLASSES
           
private  int typeKind
           
private  java.lang.Object value
           
 
Fields inherited from class org.objectweb.kilim.description.BasicNamedElementImpl
 
Fields inherited from class org.objectweb.kilim.description.TemplateElementImpl
 
Constructor Summary
Property(java.lang.String aName, int aStatus, int aTypeKind, TemplateDescription aTemplate)
          The public constructor for properties.
 
Method Summary
private static java.lang.Class getClassFromTypeKind(int aTypeKind)
           
 int getKind()
          returns the element kind.
 java.lang.Class getType()
          returns the property type.
 int getTypeKind()
           
 java.lang.Object getValue()
           
 void setType(int aType)
          sets the property type
 void setValue(java.lang.Object aObject)
           
 
Methods inherited from class org.objectweb.kilim.description.BasicNamedElementImpl
getLocalName, getStatus, isEventSource, performsAction, providesValue, setContainingTemplate, setLocalName, setStatus, toString
 
Methods inherited from class org.objectweb.kilim.description.TemplateElementImpl
clone, getContainingTemplate, getTemplateDefHierarchy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.objectweb.kilim.description.TemplateElement
clone, getContainingTemplate, getTemplateDefHierarchy
 

Field Detail

TYPE_CLASSES

private static final java.lang.Class[] TYPE_CLASSES

type

private java.lang.Class type

value

private java.lang.Object value

typeKind

private int typeKind

isBound

private boolean isBound
Constructor Detail

Property

public Property(java.lang.String aName,
                int aStatus,
                int aTypeKind,
                TemplateDescription aTemplate)
         throws KilimException
The public constructor for properties.

Parameters:
aName - : the name of the property.
aStatus - : the status of the property. It should be one KILIM.PUBLIC, PUBLIC.PROTECTED, KILIM.PR?IVATE.
aTypeKind - : the type kind of the property. It should be one of the kind defined in the class KILIM.
aTemplate - : the template in which the property is defined.
Throws:
KilimException - : generated if aName or a Template is null, if aStatus or aTypeKind has an illegal value.
Method Detail

setType

public void setType(int aType)
             throws KilimException
sets the property type

Parameters:
aType - : a type kind defined in the KILIM class.
Throws:
KilimException - : generated if Type has an illegal value.

getType

public java.lang.Class getType()
returns the property type.

Returns:
Class

getTypeKind

public int getTypeKind()
See Also:
getTypeKind()

getKind

public int getKind()
Description copied from interface: BasicElement
returns the element kind.

Returns:
int
See Also:
BasicElement.getKind()

setValue

public void setValue(java.lang.Object aObject)
              throws KilimException
Throws:
KilimException
See Also:
setValue(Object)

getValue

public java.lang.Object getValue()
See Also:
getValue()

getClassFromTypeKind

private static java.lang.Class getClassFromTypeKind(int aTypeKind)
                                             throws KilimException
Throws:
KilimException