public class IlrDynamicClass extends IlrDynamicType implements IlrMutableClass, IlrVisitable, IlrPrimitiveType
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.
IlrClass.IlrGenericClassInfoCLASS_KIND_PROPERTY, RAW_CLASS_KIND| Modifier and Type | Method and Description |
|---|---|
void |
accept(IlrVisitor visitor)
Defines a default visit path: here visit the nested classes.
|
IlrDynamicAttribute |
addAttribute(java.lang.String name,
IlrType type)
Deprecated.
As of JRules 6.0, use
IlrModelFactory.createAttribute(ilog.rules.bom.mutable.IlrMutableClass, String) |
IlrDynamicClass |
addClass(java.lang.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(java.lang.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.
|
java.util.Iterator |
allAttributes()
Returns an iterator over the the attributes declared in this class
along with all attributes inherited from superclasses.
|
java.util.Iterator |
allComponentProperties()
Returns an iterator over the the component properties declared in this class
along with all component properties inherited from superclasses.
|
java.util.Iterator |
allIndexedComponentProperties()
Returns an iterator over the the indexed component properties declared in this class
along with all indexed component properties inherited from superclasses.
|
java.util.Iterator |
allInterfaces()
Returns an iterator over the transitive closure of superinterfaces of
this class.
|
java.util.Iterator |
allMembers()
Returns an iterator over all declared and inherited members (attributes,
constructors and methods) of this class.
|
java.util.Iterator |
allMethods()
Returns an iterator over the the methods declared in this class
along with all methods inherited from superclasses.
|
java.util.Iterator |
allSuperclasses()
Returns an iterator over the transitive closure of superclasses
and superinterfaces of this class.
|
IlrAttribute |
getAttribute(java.lang.String name)
Searches for an attribute having a given name.
|
java.util.List |
getAttributes()
Returns the list of attributes in this class.
|
IlrClass |
getClass(java.lang.String name)
Searches the namespace for a class having the given name.
|
java.util.List |
getClasses()
Returns the list of the classes contained in this namespace.
|
java.util.List |
getComponentProperties()
Returns the list of component properties in this class.
|
IlrComponentProperty |
getComponentProperty(java.lang.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.
|
java.util.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. |
java.lang.String |
getFullyQualifiedRawName()
Returns the fully qualified raw name of this type.
|
IlrClass |
getGenericClass(java.lang.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. |
java.util.List |
getIndexedComponentProperties()
Returns the list of indexed component properties in this class.
|
IlrIndexedComponentProperty |
getIndexedComponentProperty(java.lang.String name,
IlrType... arguments)
Searches for an indexed component property having a given name and given parameter types.
|
IlrMethod |
getMethod(java.lang.String name,
IlrType... arguments)
Searches for a method having a given name and given parameter types.
|
IlrMethod |
getMethod(java.lang.String name,
java.util.List arguments)
Searches for a method having a given name and given parameter types.
|
java.util.List |
getMethods()
Returns the list of methods in this class.
|
java.util.List |
getMethods(java.lang.String name)
Returns the list of methods of a certain name.
|
java.lang.String |
getName()
Returns the name of this model element.
|
IlrNamespace |
getNamespace(java.lang.String name)
Returns the contained name space having the given name.
|
java.lang.Class |
getNativeClass()
Returns the native class represented by this
IlrType or null. |
java.util.List |
getNestedClasses()
Returns the list of classes nested in this class.
|
java.lang.String |
getRawName()
Returns the raw name of this type.
|
java.util.List |
getSuperclasses()
Returns the list of superclasses of this class.
|
int |
getTypeTag() |
IlrClass |
getWrapperClass()
Returns the wrapper class for this primitive type.
|
java.util.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 |
java.util.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) |
getArrayClass, getArrayType, isClass, isEnum, isPrimitiveType, isTypeVariable, isWildcardTypefireUpdate, fireUpdate, fixType, getFullyQualifiedName, getMutableObjectModel, getObjectModel, getPropertyValue, getPropertyValue, hasListeners, isPropertyPersistent, propertyNames, removeProperty, setPersistentProperty, setPersistentProperty, setPropertyValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetFinalallInheritedAttributes, allInheritedMembers, allInheritedMethods, isFinal, visitmodelElementIteratordetach, getArrayClass, getArrayType, getJavaClass, isClass, isEnum, isMissingReference, isPrimitiveType, isTypeVariable, isWildcardTypegetMutableObjectModelgetFullyQualifiedName, getObjectModelisPropertyPersistent, setPersistentProperty, setPersistentPropertygetPropertyValue, getPropertyValue, propertyNames, removeProperty, setPropertyValuepublic IlrDynamicClass addClass(java.lang.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 java.lang.Class getNativeClass()
IlrType or null.getNativeClass in interface IlrTypepublic java.lang.String getName()
getName in interface IlrModelElementgetName in class IlrDynamicModelElementpublic java.lang.String getRawName()
IlrTypeIlrModelElement.getName().getRawName in interface IlrTypegetRawName in class IlrDynamicTypepublic java.lang.String getFullyQualifiedRawName()
IlrTypeIlrModelElement.getFullyQualifiedName().getFullyQualifiedRawName in interface IlrTypegetFullyQualifiedRawName in class IlrDynamicTypepublic boolean isInterface()
true if the class is an interface.isInterface in interface IlrClasspublic void setInterface(boolean interfaceFlag)
interface property of this class. Initially,
this property is false.setInterface in interface IlrMutableClassinterfaceFlag - The new value of the interface flag.public void setPackageVisibility()
package.
Note:
This is the default setting for the visibility.setPackageVisibility in interface IlrMutableClasspublic boolean isPublic()
true if the class is public.public void setPublic()
public.setPublic in interface IlrMutableClasspublic boolean isProtected()
true if the class is protected.isProtected in interface IlrClasspublic void setProtected()
protected.setProtected in interface IlrMutableClasspublic boolean isPrivate()
true if the class is private.public void setPrivate()
private.setPrivate in interface IlrMutableClasspublic boolean isStatic()
true if the class is static.public void setStatic(boolean flag)
false.setStatic in interface IlrMutableClassflag - the new value of the 'static' property.public boolean isAbstract()
true if the class is abstract.isAbstract in interface IlrClasspublic void setAbstract(boolean flag)
false.setAbstract in interface IlrMutableClassflag - The new value of the 'abstract' property.public boolean isArray()
true if this type is an array class.isArray in interface IlrTypeisArray in class IlrDynamicTypepublic IlrType getComponentType()
null otherwise.getComponentType in interface IlrTypegetComponentType in class IlrDynamicTypepublic IlrDomain getDomain()
public void setDomain(IlrDomain domain)
setDomain in interface IlrMutableTypedomain - The new domain of the class. Initially this
property is null.public IlrNamespace getEnclosingNamespace()
IlrPackage or another
IlrClass.getEnclosingNamespace in interface IlrModelElementnullpublic java.util.List getNestedClasses()
Note:If there are no
nested classes, this method may either return null or an
empty list.
getNestedClasses in interface IlrClasspublic IlrClass getClass(java.lang.String name)
IlrNamespacenull is
returned.getClass in interface IlrNamespacepublic IlrClass getGenericClass(java.lang.String rawClassName, int numberOfTypeParameters)
getGenericClass in interface IlrNamespacepublic java.util.List getClasses()
IlrNamespacenull or an empty list.getClasses in interface IlrNamespacepublic java.util.List getSuperclasses()
null or an
empty list.getSuperclasses in interface IlrClasspublic void addSuperclass(IlrClass aClass)
addSuperclass in interface IlrMutableClassaClass - the class which will be added to the superclass list.public java.util.List getConstructors()
null or an
empty list.getConstructors in interface IlrClasspublic IlrDynamicConstructor addConstructor()
IlrModelFactory.createConstructor(ilog.rules.bom.mutable.IlrMutableClass).IlrDynamicConstructor in this class.public java.util.List getMethods()
null or an
empty list.
getMethods in interface IlrClassIlrMethodpublic java.util.List getMethods(java.lang.String name)
null or an
empty list.getMethods in interface IlrClassname - The name of the method.IlrMethodpublic IlrDynamicMethod addMethod(java.lang.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 java.util.List getAttributes()
null or an empty list.getAttributes in interface IlrClassIlrAttributepublic java.util.List getComponentProperties()
null or an empty list.getComponentProperties in interface IlrClassIlrComponentPropertypublic java.util.List getIndexedComponentProperties()
null or an empty list.getIndexedComponentProperties in interface IlrClassIlrIndexedComponentPropertypublic IlrDynamicAttribute addAttribute(java.lang.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(java.lang.String name)
null is
returned.getNamespace in interface IlrNamespacepublic void accept(IlrVisitor visitor)
accept in interface IlrVisitablevisitor - The visitor.public boolean isSubclassOf(IlrClass otherClass)
isSubclassOf in interface IlrClassotherClass - 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 IlrClasspublic java.util.Iterator allSuperclasses()
allSuperclasses in interface IlrClasspublic java.util.Iterator allMethods()
allMethods in interface IlrClasspublic java.util.Iterator allAttributes()
allAttributes in interface IlrClasspublic java.util.Iterator allComponentProperties()
allComponentProperties in interface IlrClasspublic java.util.Iterator allIndexedComponentProperties()
allIndexedComponentProperties in interface IlrClasspublic java.util.Iterator interfaces()
interfaces in interface IlrClasspublic java.util.Iterator allInterfaces()
allInterfaces in interface IlrClasspublic java.util.Iterator members()
public java.util.Iterator allMembers()
allMembers in interface IlrClasspublic IlrConstructor getConstructor(IlrType... arguments)
getConstructor in interface IlrClassarguments - an array of typespublic IlrMethod getMethod(java.lang.String name, IlrType... arguments)
public IlrMethod getMethod(java.lang.String name, java.util.List arguments)
getMethod in interface IlrClassname - A character string.arguments - A list of IlrTypes or IlrParameters.public IlrAttribute getAttribute(java.lang.String name)
getAttribute in interface IlrClassname - A character string.public IlrComponentProperty getComponentProperty(java.lang.String name)
getComponentProperty in interface IlrClassname - A character string.public IlrIndexedComponentProperty getIndexedComponentProperty(java.lang.String name, IlrType... arguments)
getIndexedComponentProperty in interface IlrClassname - A character string.arguments - An array of types.public boolean widens(IlrPrimitiveType otherType)
public boolean isVoidType()
IlrPrimitiveTypetrue if this is the void typeisVoidType in interface IlrPrimitiveTypepublic boolean isBooleanType()
IlrPrimitiveTypetrue if this is the boolean typeisBooleanType in interface IlrPrimitiveTypepublic boolean isByteType()
IlrPrimitiveTypetrue if this is the byte typeisByteType in interface IlrPrimitiveTypepublic boolean isCharType()
IlrPrimitiveTypetrue if this is the char typeisCharType in interface IlrPrimitiveTypepublic boolean isFloatType()
IlrPrimitiveTypetrue if this is the float typeisFloatType in interface IlrPrimitiveTypepublic boolean isDoubleType()
IlrPrimitiveTypetrue if this is the double typeisDoubleType in interface IlrPrimitiveTypepublic boolean isShortType()
IlrPrimitiveTypetrue if this is the short typeisShortType in interface IlrPrimitiveTypepublic boolean isIntType()
IlrPrimitiveTypetrue if this is the int typeisIntType in interface IlrPrimitiveTypepublic boolean isLongType()
IlrPrimitiveTypetrue if this is the long typeisLongType in interface IlrPrimitiveTypepublic IlrClass getWrapperClass()
IlrPrimitiveTypegetWrapperClass in interface IlrPrimitiveTypepublic boolean isNumericType()
IlrPrimitiveTypetrue if this type is a numeric type.isNumericType in interface IlrPrimitiveTypepublic boolean isOtherType()
public int getTypeTag()
public IlrClass.IlrGenericClassInfo getGenericInfo()
IlrClassnull if the class is neither a generic
nor an instantiation of a generic class.getGenericInfo in interface IlrClassnull.© Copyright IBM Corp. 1987, 2017