|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.bom.dynamic.IlrDynamicModelElement ilog.rules.bom.dynamic.IlrDynamicType ilog.rules.bom.dynamic.IlrDynamicClass
public class IlrDynamicClass
An implementation of the IlrClass
interface.
Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short term storage or RMI between applications that run the same version of IBM Decision Server.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface ilog.rules.bom.IlrClass |
---|
IlrClass.IlrGenericClassInfo |
Field Summary |
---|
Fields inherited from interface ilog.rules.bom.IlrClass |
---|
CLASS_KIND_PROPERTY, RAW_CLASS_KIND |
Method Summary | |
---|---|
void |
accept(IlrVisitor visitor)
Defines a default visit path: here visit the nested classes. |
IlrDynamicAttribute |
addAttribute(String name,
IlrType type)
Deprecated. As of JRules 6.0, use IlrModelFactory.createAttribute(ilog.rules.bom.mutable.IlrMutableClass, String) |
IlrDynamicClass |
addClass(String name)
Adds an IlrDynamicClass in this class. |
IlrDynamicConstructor |
addConstructor()
Deprecated. As of JRules 6.0, use IlrModelFactory.createConstructor(ilog.rules.bom.mutable.IlrMutableClass) . |
IlrDynamicMethod |
addMethod(String name,
IlrType returnType)
Deprecated. As of JRules 6.0, use IlrModelFactory.createMethod(ilog.rules.bom.mutable.IlrMutableClass, String) |
void |
addSuperclass(IlrClass aClass)
Adds a superclass to this class. |
Iterator |
allAttributes()
Returns an iterator over the the attributes declared in this class along with all attributes inherited from superclasses. |
Iterator |
allComponentProperties()
Returns an iterator over the the component properties declared in this class along with all component properties inherited from superclasses. |
Iterator |
allIndexedComponentProperties()
Returns an iterator over the the indexed component properties declared in this class along with all indexed component properties inherited from superclasses. |
Iterator |
allInterfaces()
Returns an iterator over the transitive closure of superinterfaces of this class. |
Iterator |
allMembers()
Returns an iterator over all declared and inherited members (attributes, constructors and methods) of this class. |
Iterator |
allMethods()
Returns an iterator over the the methods declared in this class along with all methods inherited from superclasses. |
Iterator |
allSuperclasses()
Returns an iterator over the transitive closure of superclasses and superinterfaces of this class. |
IlrAttribute |
getAttribute(String name)
Searches for an attribute having a given name. |
List |
getAttributes()
Returns the list of attributes in this class. |
IlrClass |
getClass(String name)
Searches the namespace for a class having the given name. |
List |
getClasses()
Returns the list of the classes contained in this namespace. |
List |
getComponentProperties()
Returns the list of component properties in this class. |
IlrComponentProperty |
getComponentProperty(String name)
Searches for a component property having a given name. |
IlrType |
getComponentType()
Returns the component type if this type is an array type, null otherwise. |
IlrConstructor |
getConstructor(IlrType... arguments)
Searches for a constructor having given parameter types. |
List |
getConstructors()
Returns the list of constructors in this class. |
IlrDomain |
getDomain()
Returns the domain of the type. |
IlrNamespace |
getEnclosingNamespace()
Returns the enclosing namespace of this class. |
IlrClass |
getFirstSuperclass()
Returns the first class in the list of superclasses of this class that is not an interface and is null if there is
no such class. |
String |
getFullyQualifiedRawName()
Returns the fully qualified raw name of this type. |
IlrClass |
getGenericClass(String rawClassName,
int numberOfTypeParameters)
|
IlrClass.IlrGenericClassInfo |
getGenericInfo()
Returns the generic information about this class, or null if the class is neither a generic
nor an instantiation of a generic class. |
List |
getIndexedComponentProperties()
Returns the list of indexed component properties in this class. |
IlrIndexedComponentProperty |
getIndexedComponentProperty(String name,
IlrType... arguments)
Searches for an indexed component property having a given name and given parameter types. |
IlrMethod |
getMethod(String name,
IlrType... arguments)
Searches for a method having a given name and given parameter types. |
IlrMethod |
getMethod(String name,
List arguments)
Searches for a method having a given name and given parameter types. |
List |
getMethods()
Returns the list of methods in this class. |
List |
getMethods(String name)
Returns the list of methods of a certain name. |
String |
getName()
Returns the name of this model element. |
IlrNamespace |
getNamespace(String name)
Returns the contained name space having the given name. |
Class |
getNativeClass()
Returns the native class represented by this IlrType or null . |
List |
getNestedClasses()
Returns the list of classes nested in this class. |
String |
getRawName()
Returns the raw name of this type. |
List |
getSuperclasses()
Returns the list of superclasses of this class. |
int |
getTypeTag()
|
IlrClass |
getWrapperClass()
Returns the wrapper class for this primitive type. |
Iterator |
interfaces()
Returns an iterator over the direct superinterfaces of this class. |
boolean |
isAbstract()
Returns true if the class is abstract. |
boolean |
isArray()
Returns true if this type is an array class. |
boolean |
isBooleanType()
Returns true if this is the boolean type |
boolean |
isByteType()
Returns true if this is the byte type |
boolean |
isCharType()
Returns true if this is the char type |
boolean |
isDoubleType()
Returns true if this is the double type |
boolean |
isFloatType()
Returns true if this is the float type |
boolean |
isInterface()
Returns true if the class is an interface. |
boolean |
isIntType()
Returns true if this is the int type |
boolean |
isLongType()
Returns true if this is the long type |
boolean |
isNumericType()
Returns true if this type is a numeric type. |
boolean |
isOtherType()
|
boolean |
isPrivate()
Returns true if the class is private. |
boolean |
isProtected()
Returns true if the class is protected. |
boolean |
isPublic()
Returns true if the class is public. |
boolean |
isShortType()
Returns true if this is the short type |
boolean |
isStatic()
Returns true if the class is static. |
boolean |
isSubclassOf(IlrClass otherClass)
Tests whether a class is a direct or indirect subclass of another class. |
boolean |
isVoidType()
Returns true if this is the void type |
Iterator |
members()
Returns an iterator over all declared members (attributes, constructors and methods) of this class. |
void |
setAbstract(boolean flag)
Sets the 'abstract' property of this class. |
void |
setDomain(IlrDomain domain)
Sets the domain of this class. |
void |
setInterface(boolean interfaceFlag)
Sets the interface property of this class. |
void |
setPackageVisibility()
Sets the visibility of this class to package . |
void |
setPrivate()
Sets the visibility of this class to private . |
void |
setProtected()
Sets the visibility of this class to protected . |
void |
setPublic()
Sets the visibility of this class to public . |
void |
setStatic(boolean flag)
Sets the 'static' property of this class. |
boolean |
widens(IlrPrimitiveType otherType)
|
Methods inherited from class ilog.rules.bom.dynamic.IlrDynamicType |
---|
getArrayClass, getArrayType, isClass, isEnum, isPrimitiveType, isTypeVariable, isWildcardType |
Methods inherited from class ilog.rules.bom.dynamic.IlrDynamicModelElement |
---|
fireUpdate, fireUpdate, fixType, getFullyQualifiedName, getMutableObjectModel, getObjectModel, getPropertyValue, getPropertyValue, hasListeners, isPropertyPersistent, propertyNames, removeProperty, setPersistentProperty, setPersistentProperty, setPropertyValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ilog.rules.bom.mutable.IlrMutableClass |
---|
setFinal |
Methods inherited from interface ilog.rules.bom.IlrClass |
---|
allInheritedAttributes, allInheritedMembers, allInheritedMethods, isFinal, visit |
Methods inherited from interface ilog.rules.bom.IlrNamespace |
---|
modelElementIterator |
Methods inherited from interface ilog.rules.bom.IlrType |
---|
detach, getArrayClass, getArrayType, getJavaClass, isClass, isEnum, isMissingReference, isPrimitiveType, isTypeVariable, isWildcardType |
Methods inherited from interface ilog.rules.bom.mutable.IlrMutableModelElement |
---|
getMutableObjectModel |
Methods inherited from interface ilog.rules.bom.IlrModelElement |
---|
getFullyQualifiedName, getObjectModel |
Methods inherited from interface ilog.rules.bom.IlrProperties |
---|
isPropertyPersistent, setPersistentProperty, setPersistentProperty |
Methods inherited from interface ilog.rules.bom.IlrTransientProperties |
---|
getPropertyValue, getPropertyValue, propertyNames, removeProperty, setPropertyValue |
Method Detail |
---|
public IlrDynamicClass addClass(String name)
IlrDynamicClass
in this class.
Note: There is no verification that the
class does not already contain an IlrDynamicMethod
with the given name.
name
- The name of the new class.
public Class getNativeClass()
IlrType
or null
.
getNativeClass
in interface IlrType
public String getName()
getName
in interface IlrModelElement
getName
in class IlrDynamicModelElement
public String getRawName()
IlrType
IlrModelElement.getName()
.
getRawName
in interface IlrType
getRawName
in class IlrDynamicType
public String getFullyQualifiedRawName()
IlrType
IlrModelElement.getFullyQualifiedName()
.
getFullyQualifiedRawName
in interface IlrType
getFullyQualifiedRawName
in class IlrDynamicType
public boolean isInterface()
true
if the class is an interface.
isInterface
in interface IlrClass
public void setInterface(boolean interfaceFlag)
interface
property of this class. Initially,
this property is false
.
setInterface
in interface IlrMutableClass
interfaceFlag
- The new value of the interface flag.public void setPackageVisibility()
package
.
Note: This is the default setting for the visibility.
setPackageVisibility
in interface IlrMutableClass
public boolean isPublic()
true
if the class is public.
isPublic
in interface IlrClass
public void setPublic()
public
.
setPublic
in interface IlrMutableClass
public boolean isProtected()
true
if the class is protected.
isProtected
in interface IlrClass
public void setProtected()
protected
.
setProtected
in interface IlrMutableClass
public boolean isPrivate()
true
if the class is private.
isPrivate
in interface IlrClass
public void setPrivate()
private
.
setPrivate
in interface IlrMutableClass
public boolean isStatic()
true
if the class is static.
isStatic
in interface IlrClass
public void setStatic(boolean flag)
false
.
setStatic
in interface IlrMutableClass
flag
- the new value of the 'static' property.public boolean isAbstract()
true
if the class is abstract.
isAbstract
in interface IlrClass
public void setAbstract(boolean flag)
false
.
setAbstract
in interface IlrMutableClass
flag
- The new value of the 'abstract' property.public boolean isArray()
true
if this type is an array class.
isArray
in interface IlrType
isArray
in class IlrDynamicType
public IlrType getComponentType()
null
otherwise.
getComponentType
in interface IlrType
getComponentType
in class IlrDynamicType
public IlrDomain getDomain()
getDomain
in interface IlrType
null
if the type does not have
a domain.
Note: The returned domain may be the super type domain if applicable, thus be careful if you want to change it.
public void setDomain(IlrDomain domain)
setDomain
in interface IlrMutableType
domain
- The new domain of the class. Initially this
property is null
.public IlrNamespace getEnclosingNamespace()
IlrPackage
or another
IlrClass
.
getEnclosingNamespace
in interface IlrModelElement
null
public List getNestedClasses()
Note:If there are no
nested classes, this method may either return null
or an
empty list.
getNestedClasses
in interface IlrClass
public IlrClass getClass(String name)
IlrNamespace
null
is
returned.
getClass
in interface IlrNamespace
public IlrClass getGenericClass(String rawClassName, int numberOfTypeParameters)
getGenericClass
in interface IlrNamespace
public List getClasses()
IlrNamespace
null
or an empty list.
getClasses
in interface IlrNamespace
public List getSuperclasses()
Note: If there are no
superclasses, this method may either return null
or an
empty list.
getSuperclasses
in interface IlrClass
public void addSuperclass(IlrClass aClass)
addSuperclass
in interface IlrMutableClass
aClass
- the class which will be added to the superclass list.public List getConstructors()
Note: If there are no
constructors, this method may either return null
or an
empty list.
getConstructors
in interface IlrClass
public IlrDynamicConstructor addConstructor()
IlrModelFactory.createConstructor(ilog.rules.bom.mutable.IlrMutableClass)
.
IlrDynamicConstructor
in this class.
public List getMethods()
Note: If there are no
methods, this method may either return null
or an
empty list.
The new {link #getMethods(String)} is more performant than this one if you
already have the name of the methods you are looking for.
getMethods
in interface IlrClass
IlrMethod
public List getMethods(String name)
null
or an
empty list.
getMethods
in interface IlrClass
name
- The name of the method.IlrMethod
public IlrDynamicMethod addMethod(String name, IlrType returnType)
IlrModelFactory.createMethod(ilog.rules.bom.mutable.IlrMutableClass, String)
IlrDynamicMethod
in this class.
Note: There is no verification that the
class does not already contain an IlrDynamicMethod
with the given name.
name
- The name of the class.returnType
- The return type of the method.
public List getAttributes()
Note: If there are no attributes, this method
may either return null
or an empty list.
getAttributes
in interface IlrClass
IlrAttribute
public List getComponentProperties()
Note: If there are no component properties, this method may
either return null
or an empty list.
getComponentProperties
in interface IlrClass
IlrComponentProperty
public List getIndexedComponentProperties()
Note: If there are no indexed component properties, this
method may either return null
or an empty list.
getIndexedComponentProperties
in interface IlrClass
IlrIndexedComponentProperty
public IlrDynamicAttribute addAttribute(String name, IlrType type)
IlrModelFactory.createAttribute(ilog.rules.bom.mutable.IlrMutableClass, String)
IlrDynamicAttribute
in this class.
Note: There is no verification that the
class does not already contain an IlrDynamicMethod
with the given name.
name
- The name of the attribute.type
- The type of the attribute.
public IlrNamespace getNamespace(String name)
null
is
returned.
getNamespace
in interface IlrNamespace
public void accept(IlrVisitor visitor)
accept
in interface IlrVisitable
visitor
- The visitor.public boolean isSubclassOf(IlrClass otherClass)
isSubclassOf
in interface IlrClass
otherClass
- An IlrClass
.
true
if this class is either directly or transitively
a subclass of otherClass
.public IlrClass getFirstSuperclass()
null
if there is
no such class.
getFirstSuperclass
in interface IlrClass
public Iterator allSuperclasses()
allSuperclasses
in interface IlrClass
public Iterator allMethods()
allMethods
in interface IlrClass
public Iterator allAttributes()
allAttributes
in interface IlrClass
public Iterator allComponentProperties()
allComponentProperties
in interface IlrClass
public Iterator allIndexedComponentProperties()
allIndexedComponentProperties
in interface IlrClass
public Iterator interfaces()
interfaces
in interface IlrClass
public Iterator allInterfaces()
allInterfaces
in interface IlrClass
public Iterator members()
members
in interface IlrClass
public Iterator allMembers()
allMembers
in interface IlrClass
public IlrConstructor getConstructor(IlrType... arguments)
getConstructor
in interface IlrClass
arguments
- an array of types
public IlrMethod getMethod(String name, IlrType... arguments)
getMethod
in interface IlrClass
name
- a character string.arguments
- an array of types
public IlrMethod getMethod(String name, List arguments)
getMethod
in interface IlrClass
name
- A character string.arguments
- A list of IlrType
s or IlrParameter
s.
public IlrAttribute getAttribute(String name)
getAttribute
in interface IlrClass
name
- A character string.
public IlrComponentProperty getComponentProperty(String name)
getComponentProperty
in interface IlrClass
name
- A character string.
public IlrIndexedComponentProperty getIndexedComponentProperty(String name, IlrType... arguments)
getIndexedComponentProperty
in interface IlrClass
name
- A character string.arguments
- An array of types.
public boolean widens(IlrPrimitiveType otherType)
public boolean isVoidType()
IlrPrimitiveType
true
if this is the void
type
isVoidType
in interface IlrPrimitiveType
public boolean isBooleanType()
IlrPrimitiveType
true
if this is the boolean
type
isBooleanType
in interface IlrPrimitiveType
public boolean isByteType()
IlrPrimitiveType
true
if this is the byte
type
isByteType
in interface IlrPrimitiveType
public boolean isCharType()
IlrPrimitiveType
true
if this is the char
type
isCharType
in interface IlrPrimitiveType
public boolean isFloatType()
IlrPrimitiveType
true
if this is the float
type
isFloatType
in interface IlrPrimitiveType
public boolean isDoubleType()
IlrPrimitiveType
true
if this is the double
type
isDoubleType
in interface IlrPrimitiveType
public boolean isShortType()
IlrPrimitiveType
true
if this is the short
type
isShortType
in interface IlrPrimitiveType
public boolean isIntType()
IlrPrimitiveType
true
if this is the int
type
isIntType
in interface IlrPrimitiveType
public boolean isLongType()
IlrPrimitiveType
true
if this is the long
type
isLongType
in interface IlrPrimitiveType
public IlrClass getWrapperClass()
IlrPrimitiveType
getWrapperClass
in interface IlrPrimitiveType
public boolean isNumericType()
IlrPrimitiveType
true
if this type is a numeric type.
isNumericType
in interface IlrPrimitiveType
public boolean isOtherType()
public int getTypeTag()
public IlrClass.IlrGenericClassInfo getGenericInfo()
IlrClass
null
if the class is neither a generic
nor an instantiation of a generic class.
getGenericInfo
in interface IlrClass
null
.
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |