|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.data.AbleLiteral
com.ibm.able.data.AbleNewObjectLiteral
This class dynamically creates a new instance of an object by performing a method invocation to a constructor on the class. Each time this class is called, it will return a new object. Instances of this class are used to create initial values on AbleVariables and to dynamically create instances of objects as part of rules in AbleRuleSets.
The data type name and corresponding data type class name must be provided on the constructor of this class.
| Field Summary | |
|---|---|
protected java.util.Vector |
myArgs
The arguments to the constructor (A vector of AbleRd objects) |
protected AbleDataContext |
myContext
|
protected java.lang.reflect.Constructor |
myCtor
The constructor we call to create the new object |
protected java.lang.String |
myDataType
The data type. |
protected java.lang.String |
myDataTypeClassName
The data type class name. |
protected AbleRd |
myIndexExpression
The array index expression (if any). |
| Constructor Summary | |
|---|---|
AbleNewObjectLiteral(AbleDataContext theContext,
java.lang.String theDataType,
java.lang.String theDataTypeClassName,
java.util.Vector theArgs,
AbleRd theIndexExpression)
Create a new Able new object literal with the specified information. |
|
AbleNewObjectLiteral(AbleNewObjectLiteral theLiteral,
java.util.Vector theArgs,
AbleRd theIndexExpression)
Create a copy of this method literal with replacement args |
|
| Method Summary | |
|---|---|
java.lang.String |
arlCRdString()
Return a formal ARL "clause read" string that describes this data object. |
boolean |
cmpEq(AbleRd theRhs)
Comparison, equal to: compare the current value of this data object to the current value of theRhs. |
boolean |
cmpGt(AbleRd theRhs)
Comparison, greater than: compare the current value of this data object to the current value of theRhs. |
boolean |
cmpGtEq(AbleRd theRhs)
Comparison, greater than or equal to: compare the current value of this data object to the current value of theRhs. |
double |
cmpIs(AbleRd theRhs)
Comparison, fuzzy equal to: compare the current value of this data object to the current value of theRhs. |
boolean |
cmpLt(AbleRd theRhs)
Comparison, less than: compare the current value of this data object to the current value of theRhs. |
boolean |
cmpLtEq(AbleRd theRhs)
Comparison, less than or equal to: compare the current value of this data object to the current value of theRhs. |
boolean |
cmpNeq(AbleRd theRhs)
Comparison, not equal to: compare the current value of this data object to the current value of theRhs. |
java.lang.Object |
createInstance()
Create the new object instance |
void |
ctorBuiltInHelper()
|
protected java.lang.Object[] |
cvtArgs(java.util.Vector theArgs)
|
protected java.lang.Class[] |
getArgClasses(java.util.Vector theArgs)
|
boolean |
getBooleanValue()
Retrieve the value of this data object as a boolean value. |
int |
getDataType()
Retrieve the data type of this data object. |
java.lang.Class |
getDataTypeClass()
Retrieve the actual class of this object's underlying data type. |
java.lang.String |
getDataTypeClassName()
Retrieve the name of the class of this object's underlying data type. |
AbleFuzzySet |
getFuzzyValue()
Retrieve the value of this data object as a fuzzy value. |
java.lang.Object |
getGenericValue()
Retrieve the value of this data object as an Object. |
double |
getNumericValue()
Retrieve the value of this data object as a numeric value. |
java.util.BitSet |
getReferents()
Retrieve the Ids of the variables to which this data object refers, if any. |
java.lang.Class |
getReturnType()
Get the data type of the value returned from the associated method invocation. |
java.lang.String |
getStringValue()
Retrieve the value of this data object as a string value. |
java.lang.String |
getTemplateString(java.util.Vector theTemplateVars)
Retrieve a text format string for use by rule templates. |
AbleLiteral |
getValue()
Retrieve the value of this data object as a literal. |
java.util.HashSet |
getVariableReferences()
Retrieve the set of variables (if any) referenced by this expression (and subexpressions) |
boolean |
isConstant()
Returns true if this AbleRd object is a constant value false, if it does not. |
protected void |
resolveConstructor(java.lang.Object[] theArgs)
Find the constructor to use to create new instances. |
java.lang.String |
traceString(int theTraceStringFlavor)
Retrieve a string describing (the contents of) the object. |
java.lang.String |
xmlCRdString()
Return a formal XML "clause read" string that describes this data object. |
| Methods inherited from class com.ibm.able.data.AbleLiteral |
|---|
bitwiseAND, bitwiseNOT, bitwiseOR, bitwiseShiftLeft, bitwiseShiftRight, bitwiseShiftRightZeroFill, bitwiseXOR, compDivide, compMinus, compModulo, compMultiply, compPlus, compUnaryMinus, getDataTypeAsString, getReferent, logicalAND, logicalNOT, logicalOR, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String myDataType
The name of the data type.
protected java.lang.String myDataTypeClassName
The fully-qualified class name of the data type.
protected java.util.Vector myArgs
protected AbleRd myIndexExpression
protected AbleDataContext myContext
protected transient java.lang.reflect.Constructor myCtor
| Constructor Detail |
public AbleNewObjectLiteral(AbleDataContext theContext,
java.lang.String theDataType,
java.lang.String theDataTypeClassName,
java.util.Vector theArgs,
AbleRd theIndexExpression)
throws AbleDataException
theContext - The context object (used for inner classes only)
theDataType - The name of the data type.
theDataTypeClassName - The fully-qualified theArgs - A list of AbleRd objects whose runtime values will be
passed to the constructor as arguments. Each
converted argument will be a Boolean, a Double, a
String, or an Object, depending on the type of each
AbleRd object in the argument list. The list can be
empty, but it must never be null.
theIndexExpression - An index expression for new array literals
public AbleNewObjectLiteral(AbleNewObjectLiteral theLiteral,
java.util.Vector theArgs,
AbleRd theIndexExpression)
throws AbleDataException
| Method Detail |
public void ctorBuiltInHelper()
public AbleLiteral getValue()
throws AbleDataException
getValue in interface AbleRdgetValue in class AbleLiteralAbleDataException - If the value of this object cannot be represented as
a literal.
public java.lang.Object createInstance()
throws AbleDataException
AbleDataException - If the value of this object cannot be represented as
a literal.
protected void resolveConstructor(java.lang.Object[] theArgs)
throws AbleDataException
theArgs - The dereferenced argument objects (returned by cvtArgs())
AbleDataException - If the value of this object cannot be represented as
a literal.public java.lang.Class getDataTypeClass()
AbleLiteral
getDataTypeClass in interface AbleRdgetDataTypeClass in class AbleLiteralpublic java.lang.String getDataTypeClassName()
AbleLiteral
getDataTypeClassName in interface AbleRdgetDataTypeClassName in class AbleLiteral
public boolean getBooleanValue()
throws AbleDataException
getBooleanValue in interface AbleRdgetBooleanValue in class AbleLiteralAbleDataException - If the value of this object cannot be represented as
a boolean value.
public AbleFuzzySet getFuzzyValue()
throws AbleDataException
getFuzzyValue in interface AbleRdgetFuzzyValue in class AbleLiteralAbleDataException - If the value of this object cannot be represented as
a fuzzy value.
public java.lang.Object getGenericValue()
throws AbleDataException
getGenericValue in interface AbleRdgetGenericValue in class AbleLiteralAbleDataException - If the value of this object cannot be represented as
an Object.
public double getNumericValue()
throws AbleDataException
getNumericValue in interface AbleRdgetNumericValue in class AbleLiteralAbleDataException - If the value of this object cannot be represented as
a numeric value.
public java.lang.String getStringValue()
throws AbleDataException
getStringValue in interface AbleRdgetStringValue in class AbleLiteralAbleDataException - If the value of this object cannot be represented as
a string value.
public boolean cmpEq(AbleRd theRhs)
throws AbleDataException
"==" is used for numeric and boolean compares; equals() is used for Object compares; and Collator.equals() is used for String compares.
cmpEq in interface AbleRdcmpEq in class AbleLiteraltheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public boolean cmpGt(AbleRd theRhs)
throws AbleDataException
AbleLiteral">" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.
cmpGt in interface AbleRdcmpGt in class AbleLiteraltheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public boolean cmpGtEq(AbleRd theRhs)
throws AbleDataException
AbleLiteral">=" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.
cmpGtEq in interface AbleRdcmpGtEq in class AbleLiteraltheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public double cmpIs(AbleRd theRhs)
throws AbleDataException
AbleLiteralFuzzy membership is used for the compare.
cmpIs in interface AbleRdcmpIs in class AbleLiteraltheRhs - The right-hand side of the comparison.
This must be a fuzzy set.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public boolean cmpLt(AbleRd theRhs)
throws AbleDataException
AbleLiteral"<" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.
cmpLt in interface AbleRdcmpLt in class AbleLiteraltheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public boolean cmpLtEq(AbleRd theRhs)
throws AbleDataException
AbleLiteral"<=" is used for numeric compares; Collator.compare() is used for String compares. Use of other data types on the left-hand side causes an exception.
cmpLtEq in interface AbleRdcmpLtEq in class AbleLiteraltheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.
public boolean cmpNeq(AbleRd theRhs)
throws AbleDataException
AbleLiteral"!=" is used for numeric and boolean compares; ! equals() is used for Object compares; and ! Collator.equals() is used for String compares.
cmpNeq in interface AbleRdcmpNeq in class AbleLiteraltheRhs - The right-hand side of the comparison.
AbleDataException - If the right-hand side cannot be converted (if
necessary) and compared to this data object.public boolean isConstant()
AbleRd
isConstant in interface AbleRdisConstant in class AbleLiteralpublic java.lang.String arlCRdString()
arlCRdString in interface AbleRdarlCRdString in class AbleLiteralpublic java.lang.String getTemplateString(java.util.Vector theTemplateVars)
getTemplateString in interface AbleRdgetTemplateString in class AbleLiteraltheTemplateVars - An ordered list of template variables referenced by this rule.
public java.lang.String xmlCRdString()
xmlCRdString in interface AbleRdxmlCRdString in class AbleLiteralpublic java.util.BitSet getReferents()
getReferents in interface AbleRdgetReferents in class AbleLiteral
public java.lang.Class getReturnType()
throws java.rmi.RemoteException
java.rmi.RemoteException
protected java.lang.Class[] getArgClasses(java.util.Vector theArgs)
throws AbleDataException
AbleDataException
protected java.lang.Object[] cvtArgs(java.util.Vector theArgs)
throws AbleDataException
AbleDataExceptionpublic java.lang.String traceString(int theTraceStringFlavor)
traceString in interface AbleRdtraceString in class AbleLiteraltheTraceStringFlavor - An Able.TraceStringFlavor value.
public int getDataType()
AbleLiteral
getDataType in interface AbleRdgetDataType in class AbleLiteralAbleRd.getDataType()public java.util.HashSet getVariableReferences()
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||