ilog.rules.factory
Class IlrStaticFieldValue
- java.lang.Object
-
- ilog.rules.factory.IlrValue
-
- ilog.rules.factory.IlrStaticFieldValue
-
- All Implemented Interfaces:
- IlrAssignable, java.io.Serializable
public class IlrStaticFieldValue extends IlrValue implements IlrAssignable
This class represents a static field value of an object.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
-
-
Constructor Summary
Constructors Constructor and Description IlrStaticFieldValue(IlrAttribute field)Constructs a static field using a XOM field.IlrStaticFieldValue(IlrClass clazz, java.lang.String fieldName)Constructs a static field using a class and a field name.IlrStaticFieldValue(IlrReflect reflect, java.lang.Class clazz, java.lang.String fieldName)Constructs a static field using a class and a field name.IlrStaticFieldValue(IlrReflect reflect, java.lang.reflect.Field field)Constructs a static field using an introspected field.IlrStaticFieldValue(IlrReflect reflect, java.lang.String className, java.lang.String fieldName)Constructs a static field using a class name and a field name.
-
Method Summary
Methods Modifier and Type Method and Description IlrAssignmentaddAssign(IlrValue value)Creates a field assignment represented by the value passed as the argument.IlrAssignmentassign(IlrValue value)Creates a field assignment represented by the value passed as the argument.IlrAssignmentdivideAssign(IlrValue value)Creates a field assignment represented by the value passed as the argument.java.lang.ObjectexploreAssignable(IlrFactoryExplorer explorer)Explores this value using as an assignable and returns an object as a result.java.lang.ObjectexploreValue(IlrFactoryExplorer explorer)Explores this value using a factory explorer and returns an object as a result.java.lang.StringgetClassName()Gets the fully-qualified name of the class which declares the field.java.lang.StringgetName()Gets the name of the field.IlrValuegetObject()Gets the object to which the field refers to.java.lang.StringgetShortClassName()Gets the short name of the class which declares the field.IlrAttributegetXOMField()Gets the field of this field value.booleanisAssignableFrom(IlrValue value)Tests whether this static field value is assignable by another value.booleanisFinal()Tests whether the field is a final field.IlrAssignmentmultiplyAssign(IlrValue value)Creates a field assignment represented by the value passed as the argument.IlrAssignmentremainderAssign(IlrValue value)Creates a field assignment represented by the value passed as the argument.voidsetObject(IlrValue object)Sets the object to which the field refers to.IlrAssignmentsubtractAssign(IlrValue value)Creates a field assignment represented by the value passed as the argument.java.lang.StringtoString()-
Methods inherited from class ilog.rules.factory.IlrValue
add, divide, getField, getReflect, getType, getXOMType, invokeEquals, isConstant, isEvent, isEventCondition, isNull, multiply, remainder, subtract, testAfter, testAfter, testBefore, testBefore, testEqual, testFalse, testGreaterOrEqual, testGreaterThan, testIn, testInstanceOf, testLessOrEqual, testLessThan, testNotEqual, testNotIn, testOccursin, testTrue, timeof, toNegative, toPositive, toPostfixDecr, toPostfixIncr, toPrefixDecr, toPrefixIncr
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ilog.rules.factory.IlrAssignable
getType
-
-
-
-
Constructor Detail
-
IlrStaticFieldValue
public IlrStaticFieldValue(IlrReflect reflect, java.lang.Class clazz, java.lang.String fieldName)
Constructs a static field using a class and a field name.- Parameters:
reflect- A reflect.clazz- The class which defines the static field.fieldName- The field name.
-
IlrStaticFieldValue
public IlrStaticFieldValue(IlrClass clazz, java.lang.String fieldName)
Constructs a static field using a class and a field name.- Parameters:
clazz- The class which defines the static field.fieldName- The field name.
-
IlrStaticFieldValue
public IlrStaticFieldValue(IlrReflect reflect, java.lang.String className, java.lang.String fieldName)
Constructs a static field using a class name and a field name.- Parameters:
reflect- A reflect.className- The name of the class which defines the static field.fieldName- The field name.
-
IlrStaticFieldValue
public IlrStaticFieldValue(IlrReflect reflect, java.lang.reflect.Field field)
Constructs a static field using an introspected field.- Parameters:
reflect- A reflect.field- A field member of a class.
-
IlrStaticFieldValue
public IlrStaticFieldValue(IlrAttribute field)
Constructs a static field using a XOM field.- Parameters:
field- A field member of a class.
-
-
Method Detail
-
isFinal
public boolean isFinal()
Tests whether the field is a final field.- Returns:
trueis the field is final,falseotherwise.
-
isAssignableFrom
public boolean isAssignableFrom(IlrValue value)
Tests whether this static field value is assignable by another value.- Specified by:
isAssignableFromin interfaceIlrAssignable- Parameters:
value- The value assigned to the expression.- Returns:
trueis this static field value is assignable by the passed argument,falseotherwise.
-
getXOMField
public IlrAttribute getXOMField()
Gets the field of this field value.- Returns:
- The field of this field value.
-
getName
public java.lang.String getName()
Gets the name of the field.- Returns:
- The name of the field.
-
getClassName
public java.lang.String getClassName()
Gets the fully-qualified name of the class which declares the field.- Returns:
- The fully-qualified name of the class which declares the field.
-
getShortClassName
public java.lang.String getShortClassName()
Gets the short name of the class which declares the field.- Returns:
- The short name of the class which declares the field.
-
getObject
public IlrValue getObject()
Gets the object to which the field refers to.
- Returns:
- The object to which the field refers to.
-
setObject
public void setObject(IlrValue object)
Sets the object to which the field refers to.
- Parameters:
object- The object to which the field refers to.
-
exploreValue
public java.lang.Object exploreValue(IlrFactoryExplorer explorer)
Explores this value using a factory explorer and returns an object as a result.- Specified by:
exploreValuein classIlrValue- Parameters:
explorer- The factory explorer.- Returns:
- An object which represents the result of the exploration,
or
nullif the method does not return a value.
-
exploreAssignable
public java.lang.Object exploreAssignable(IlrFactoryExplorer explorer)
Explores this value using as an assignable and returns an object as a result.- Specified by:
exploreAssignablein interfaceIlrAssignable- Parameters:
explorer- The factory explorer.- Returns:
- An object which represents the result of the exploration,
or
nullif the method does not return a value.
-
assign
public IlrAssignment assign(IlrValue value)
Creates a field assignment represented by the value passed as the argument.- Parameters:
value- The value to be assigned to the field.- Returns:
- A field assignment object.
-
addAssign
public IlrAssignment addAssign(IlrValue value)
Creates a field assignment represented by the value passed as the argument. The assignment represented here is:this += value.- Parameters:
value- The value to be assigned to the field.- Returns:
- A field assignment object.
-
subtractAssign
public IlrAssignment subtractAssign(IlrValue value)
Creates a field assignment represented by the value passed as the argument. The assignment represented here is:this -= value.- Parameters:
value- The value to be assigned to the field.- Returns:
- A field assignment object.
-
multiplyAssign
public IlrAssignment multiplyAssign(IlrValue value)
Creates a field assignment represented by the value passed as the argument. The assignment represented here is:this *= value.- Parameters:
value- The value to be assigned to the field.- Returns:
- A field assignment object.
-
divideAssign
public IlrAssignment divideAssign(IlrValue value)
Creates a field assignment represented by the value passed as the argument. The assignment represented here is:this /= value.- Parameters:
value- The value to be assigned to the field.- Returns:
- A field assignment object.
-
remainderAssign
public IlrAssignment remainderAssign(IlrValue value)
Creates a field assignment represented by the value passed as the argument. The assignment represented here is:this %= value.- Parameters:
value- The value to be assigned to the field.- Returns:
- A field assignment object.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-