Rule Execution Server API

ilog.rules.bom.dynamic
Class IlrDynamicMethod

java.lang.Object
  extended by ilog.rules.bom.dynamic.IlrDynamicModelElement
      extended by ilog.rules.bom.dynamic.IlrDynamicMember
          extended by ilog.rules.bom.dynamic.IlrDynamicMethod
All Implemented Interfaces:
IlrMember, IlrMemberWithParameter, IlrMethod, IlrModelElement, IlrProperties, IlrTransientProperties, IlrMutableMember, IlrMutableMemberWithParameter, IlrMutableMethod, IlrMutableModelElement, Serializable
Direct Known Subclasses:
IlrDynamicConstructor

public class IlrDynamicMethod
extends IlrDynamicMember
implements IlrMutableMethod

An implementation of the IlrMethod 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 running the same version of IBM Decision Server.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface ilog.rules.bom.IlrMethod
IlrMethod.IlrGenericMethodInfo
 
Field Summary
 
Fields inherited from interface ilog.rules.bom.IlrMethod
METHOD_KIND_PROPERTY, RAW_METHOD_KIND
 
Method Summary
 void addException(IlrClass aClass)
          Adds a class to the 'throws' clause of this method.
 void addParameter(IlrParameter parameter)
          Adds a parameter to this member's parameters.
 IlrDynamicParameter addParameter(String name, IlrType type)
          Deprecated. As of JRules 6.0, use IlrModelFactory.createParameter(ilog.rules.bom.mutable.IlrMutableMemberWithParameter, String, ilog.rules.bom.IlrType)
protected  List fixExceptionTypes()
           
 IlrMethod.IlrGenericMethodInfo getGenericInfo()
          Returns the generic information about this method, or null if the method is neither a generic nor an instantiation of a generic method.
 IlrType getMemberType()
          Returns the type of the member.
 List getMethodExceptions()
          Returns a list of classes which are exceptions that may be thrown by this method.
 Method getNativeMethod()
          Returns the native method represented by this IlrMethod, or null.
 List getParameters()
          Returns the list of parameters for this member.
 IlrType getReturnType()
          Returns the return type of the method.
 boolean isAbstract()
          Returns true if the method is abstract.
 boolean removeParameter(IlrParameter parameter)
          Removes a parameter from this member's parameters
 void setAbstract(boolean flag)
          Sets the 'abstract' property of this method.
 void setOperator(boolean flag)
          Sets the 'operator' property of this method.
 void setParameters(List parameters)
          Sets the parameter of this member.
 void setReturnType(IlrType returnType)
          Sets the return type of this method.
 void setSynchronized(boolean flag)
          Sets the 'synchronized' property of this method.
 void setTypeParameters(IlrMutableTypeVariable[] typeParameters)
           
 void setVarArgs(boolean flag)
          Sets the 'varArgs' property of this method.
 
Methods inherited from class ilog.rules.bom.dynamic.IlrDynamicMember
getDeclaringClass, getDomain, getEnclosingNamespace, isFinal, isPrivate, isProtected, isPublic, isStatic, setDomain, setFinal, setMemberType, setPackageVisibility, setPrivate, setProtected, setPublic, setStatic
 
Methods inherited from class ilog.rules.bom.dynamic.IlrDynamicModelElement
fireUpdate, fireUpdate, fixType, getFullyQualifiedName, getMutableObjectModel, getName, 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.IlrMutableMember
setDomain, setFinal, setMemberType, setPackageVisibility, setPrivate, setProtected, setPublic, setStatic
 
Methods inherited from interface ilog.rules.bom.mutable.IlrMutableModelElement
getMutableObjectModel
 
Methods inherited from interface ilog.rules.bom.IlrMethod
getJavaMethod, isConstructor, isMethod, isSynchronized, visit
 
Methods inherited from interface ilog.rules.bom.IlrMember
getDeclaringClass, getDomain, isFinal, isPrivate, isProtected, isPublic, isStatic
 
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
 

Method Detail

getNativeMethod

public Method getNativeMethod()
Returns the native method represented by this IlrMethod, or null.

Specified by:
getNativeMethod in interface IlrMethod
Since:
JRules 5.0
Returns:
The native method represented by this IlrMethod, or null.

isAbstract

public boolean isAbstract()
Returns true if the method is abstract.

Specified by:
isAbstract in interface IlrMethod

setAbstract

public void setAbstract(boolean flag)
Sets the 'abstract' property of this method. Initially, this property is false.

Specified by:
setAbstract in interface IlrMutableMethod
Parameters:
flag - the new value of the 'static' property.

setSynchronized

public void setSynchronized(boolean flag)
Sets the 'synchronized' property of this method. Initially, this property is false.

Specified by:
setSynchronized in interface IlrMutableMethod
Parameters:
flag - the new value of the 'synchronized' property.

setOperator

public void setOperator(boolean flag)
Sets the 'operator' property of this method. Initially, this property is false.

Specified by:
setOperator in interface IlrMutableMethod
Parameters:
flag - the new value of the 'operator' property.

setVarArgs

public void setVarArgs(boolean flag)
Sets the 'varArgs' property of this method. Initially, this property is false.

Specified by:
setVarArgs in interface IlrMutableMethod
Parameters:
flag - the new value of the 'varArgs' property.

getReturnType

public IlrType getReturnType()
Returns the return type of the method.

Specified by:
getReturnType in interface IlrMethod

getMemberType

public IlrType getMemberType()
Returns the type of the member. The returned type depends on the actual kind of member, yet you can expect that it will the type of an attribute or the returned type for a method.

Specified by:
getMemberType in interface IlrMember
Overrides:
getMemberType in class IlrDynamicMember
Returns:
The type of the member.

setReturnType

public void setReturnType(IlrType returnType)
Sets the return type of this method.

Specified by:
setReturnType in interface IlrMutableMethod

getMethodExceptions

public List getMethodExceptions()
Returns a list of classes which are exceptions that may be thrown by this method. Note that if the method throws no exceptions, the return value may be null or it may be an empty list.

Specified by:
getMethodExceptions in interface IlrMethod

fixExceptionTypes

protected List fixExceptionTypes()

addException

public void addException(IlrClass aClass)
Adds a class to the 'throws' clause of this method.

Specified by:
addException in interface IlrMutableMethod
Parameters:
aClass - the class that is added to the exceptions list.

getParameters

public List getParameters()
Returns the list of parameters for this member. Note that if the member has no parameters, the return value may be null or it may be an empty list.

Specified by:
getParameters in interface IlrMemberWithParameter

setParameters

public void setParameters(List parameters)
Sets the parameter of this member.

Specified by:
setParameters in interface IlrMutableMemberWithParameter
Parameters:
parameters - The parameters.

addParameter

public void addParameter(IlrParameter parameter)
Adds a parameter to this member's parameters.

Specified by:
addParameter in interface IlrMutableMemberWithParameter
Parameters:
parameter - The parameter to add.

addParameter

public IlrDynamicParameter addParameter(String name,
                                        IlrType type)
Deprecated. As of JRules 6.0, use IlrModelFactory.createParameter(ilog.rules.bom.mutable.IlrMutableMemberWithParameter, String, ilog.rules.bom.IlrType)

Adds a IlrDynamicParameter to this method. Note that no check is made that the given name is not already used by another parameter of the method.

Parameters:
name - the parameter name.
type - the parameter type.
Returns:
the parameter.

removeParameter

public boolean removeParameter(IlrParameter parameter)
Removes a parameter from this member's parameters

Specified by:
removeParameter in interface IlrMutableMemberWithParameter
Parameters:
parameter - The parameter to remove.
Returns:
true If the parameter was removed

getGenericInfo

public IlrMethod.IlrGenericMethodInfo getGenericInfo()
Description copied from interface: IlrMethod
Returns the generic information about this method, or null if the method is neither a generic nor an instantiation of a generic method.

Specified by:
getGenericInfo in interface IlrMethod
Returns:
Generic information, or null.

setTypeParameters

public void setTypeParameters(IlrMutableTypeVariable[] typeParameters)

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013