Rule Execution Server API

ilog.rules.bom
Interface IlrClass

All Superinterfaces:
IlrModelElement, IlrNamespace, IlrProperties, IlrTransientProperties, IlrType
All Known Subinterfaces:
IlrMutableClass
All Known Implementing Classes:
IlrDynamicClass

public interface IlrClass
extends IlrType, IlrNamespace

This interface is used to represent classes and interfaces in an object model.


Nested Class Summary
static interface IlrClass.IlrGenericClassInfo
          This interface provides the information for generic classes and instantiations of those generic classes
 
Field Summary
static String CLASS_KIND_PROPERTY
           
static String RAW_CLASS_KIND
           
 
Method Summary
 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 allInheritedAttributes()
          Returns an iterator over the attributes inherited from superclasses.
 Iterator allInheritedMembers()
          Returns an iterator over all inherited members (attributes, constructors and methods) of this class.
 Iterator allInheritedMethods()
          Returns an iterator over the methods 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.
 List getComponentProperties()
          Returns the list of component properties in this class.
 IlrComponentProperty getComponentProperty(String name)
          Searches for a component property having a given name.
 IlrConstructor getConstructor(IlrType... arguments)
          Searches for a constructor having given parameter types.
 List getConstructors()
          Returns the list of constructors in this class.
 IlrClass getFirstSuperclass()
          Returns the fist class in the list of superclasses of this class which is not an interface and null if there is no such class.
 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 with 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.
 List getNestedClasses()
          Returns the list of classes nested in this class.
 List getSuperclasses()
          Returns the list of superclasses of this class.
 Iterator interfaces()
          Returns an iterator over the direct superinterfaces of this class.
 boolean isAbstract()
          Returns true if the class is abstract.
 boolean isFinal()
          Returns true if the class is final.
 boolean isInterface()
          Returns true if the class is an interface.
 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 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.
 Iterator members()
          Returns an iterator over all declared members (attributes, constructors and methods) of this class.
 boolean visit(IlrObjectModel.Visitor visitor)
          Deprecated. Use IlrVisitor instead.
 
Methods inherited from interface ilog.rules.bom.IlrType
detach, getArrayClass, getArrayType, getComponentType, getDomain, getFullyQualifiedRawName, getJavaClass, getNativeClass, getRawName, isArray, isClass, isEnum, isMissingReference, isPrimitiveType, isTypeVariable, isWildcardType
 
Methods inherited from interface ilog.rules.bom.IlrNamespace
getClass, getClasses, getGenericClass, getNamespace, modelElementIterator
 
Methods inherited from interface ilog.rules.bom.IlrModelElement
getEnclosingNamespace, getFullyQualifiedName, getName, 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
 

Field Detail

CLASS_KIND_PROPERTY

static final String CLASS_KIND_PROPERTY
See Also:
Constant Field Values

RAW_CLASS_KIND

static final String RAW_CLASS_KIND
See Also:
Constant Field Values
Method Detail

getGenericInfo

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.

Since:
JRules 6.0
Returns:
Generic information, or null.

isInterface

boolean isInterface()
Returns true if the class is an interface.


isStatic

boolean isStatic()
Returns true if the class is static.


isPublic

boolean isPublic()
Returns true if the class is public.


isPrivate

boolean isPrivate()
Returns true if the class is private.


isProtected

boolean isProtected()
Returns true if the class is protected.


isFinal

boolean isFinal()
Returns true if the class is final.


isAbstract

boolean isAbstract()
Returns true if the class is abstract.


getSuperclasses

List getSuperclasses()
Returns the list of superclasses of this class. Note that if there are no superclasses, this method may either return null or an empty list.


getNestedClasses

List getNestedClasses()
Returns the list of classes nested in this class. Note that if there are no nested classes, this method may either return null or an empty list.


getConstructors

List getConstructors()
Returns the list of constructors in this class. Note that if there are no constructors, this method may either return null or an empty list.


getMethods

List getMethods()
Returns the list of methods in this class. Note that if there are no methods, this method may either return null or an empty list.

See Also:
IlrMethod

getMethods

List getMethods(String name)
Returns the list of methods of a certain name. Note that if there are no methods, this method may either return null or an empty list.

Since:
JRules 6.0
See Also:
IlrMethod

getAttributes

List getAttributes()
Returns the list of attributes in this class. Note that if there are no attributes, this method may either return null or an empty list.

See Also:
IlrAttribute

getComponentProperties

List getComponentProperties()
Returns the list of component properties in this class. Note that if there are no component properties, this method may either return null or an empty list.

See Also:
IlrComponentProperty

getIndexedComponentProperties

List getIndexedComponentProperties()
Returns the list of indexed component properties in this class. Note that if there are no indexed component properties, this method may either return null or an empty list.

See Also:
IlrIndexedComponentProperty

visit

boolean visit(IlrObjectModel.Visitor visitor)
Deprecated. Use IlrVisitor instead.

Calls the appropriate visitor's visitXXX methods for each model element (nested class, method, attribute) contained in this class. If a call to one of the visitor's visitXXX methods returns false then this method returns immediately the value false. Otherwise true is returned after all elements have been visited.

Parameters:
visitor - a visitor
Returns:
true if the class content was entirely visited.

isSubclassOf

boolean isSubclassOf(IlrClass otherClass)
Tests whether a class is a direct or indirect subclass of another class.

Parameters:
otherClass - an IlrClass
Returns:
true if this class is either directly or transitively a subclass of otherClass.

getFirstSuperclass

IlrClass getFirstSuperclass()
Returns the fist class in the list of superclasses of this class which is not an interface and null if there is no such class.


allSuperclasses

Iterator allSuperclasses()
Returns an iterator over the transitive closure of superclasses and superinterfaces of this class.


allMethods

Iterator allMethods()
Returns an iterator over the the methods declared in this class along with all methods inherited from superclasses.


allAttributes

Iterator allAttributes()
Returns an iterator over the the attributes declared in this class along with all attributes inherited from superclasses.


allComponentProperties

Iterator allComponentProperties()
Returns an iterator over the the component properties declared in this class along with all component properties inherited from superclasses.


allIndexedComponentProperties

Iterator allIndexedComponentProperties()
Returns an iterator over the the indexed component properties declared in this class along with all indexed component properties inherited from superclasses.


interfaces

Iterator interfaces()
Returns an iterator over the direct superinterfaces of this class.


allInterfaces

Iterator allInterfaces()
Returns an iterator over the transitive closure of superinterfaces of this class.


allInheritedMethods

Iterator allInheritedMethods()
Returns an iterator over the methods inherited from superclasses.


allInheritedAttributes

Iterator allInheritedAttributes()
Returns an iterator over the attributes inherited from superclasses.


members

Iterator members()
Returns an iterator over all declared members (attributes, constructors and methods) of this class.


allMembers

Iterator allMembers()
Returns an iterator over all declared and inherited members (attributes, constructors and methods) of this class.


allInheritedMembers

Iterator allInheritedMembers()
Returns an iterator over all inherited members (attributes, constructors and methods) of this class.


getConstructor

IlrConstructor getConstructor(IlrType... arguments)
Searches for a constructor having given parameter types.

Parameters:
arguments - an array of types
Returns:
the constructor if any which matches the given argument types.

getMethod

IlrMethod getMethod(String name,
                    IlrType... arguments)
Searches for a method having a given name and given parameter types.

Parameters:
name - a character string.
arguments - an array of types
Returns:
the method if any which has the given name and matches the given argument types.

getMethod

IlrMethod getMethod(String name,
                    List arguments)
Searches for a method with a given name and given parameter types.

Since:
JRules 6.0
Parameters:
name - A character string.
arguments - A list of IlrTypes or IlrParameters.
Returns:
The method, if any, which has the given name and matches the given argument types.

getAttribute

IlrAttribute getAttribute(String name)
Searches for an attribute having a given name.

Parameters:
name - a character string.
Returns:
the attribute, if any, having the given name

getComponentProperty

IlrComponentProperty getComponentProperty(String name)
Searches for a component property having a given name.

Parameters:
name - a character string.
Returns:
the component property, if any, having the given name

getIndexedComponentProperty

IlrIndexedComponentProperty getIndexedComponentProperty(String name,
                                                        IlrType... arguments)
Searches for an indexed component property having a given name and given parameter types.

Parameters:
name - a character string.
arguments - an array of types
Returns:
the indexed component property, if any which has the given name and matches the given argument types

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013