|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectagg.attribute.impl.AttrObject
agg.attribute.impl.Member
agg.attribute.impl.ValueMember
public class ValueMember
Holds an attribute handler expression, its type and the functionality for matching and transforming thereof.
Field Summary | |
---|---|
protected java.lang.Exception |
currentException
|
protected DeclMember |
decl
Declaration |
static java.lang.String |
EMPTY_VALUE_SYMBOL
This string is shown for an empty value. |
protected java.lang.String |
errorMsg
|
protected HandlerExpr |
expression
Attribute handler expression. |
protected java.lang.Object |
expressionObject
|
protected java.lang.String |
expressionText
|
protected boolean |
isTransient
|
protected ValueTuple |
tuple
Instance tuple that this value is a member of. |
Fields inherited from class agg.attribute.impl.AttrObject |
---|
classHandlerExpr, classObject, classString, initialized |
Fields inherited from interface agg.attribute.AttrInstanceMember |
---|
serialVersionUID |
Fields inherited from interface agg.attribute.impl.AttrMsgCode |
---|
ATTR_DONT_MATCH, BAD_EXPR_TYPE, EXPR_EVAL_ERR, EXPR_MUST_BE_CONST, EXPR_MUST_BE_CONST_OR_VAR, EXPR_PARSE_ERR, EXPR_REQUIRED, MATCH_TARGETS_DIFFER, NAME_DUPLICATION, NO_SUCH_NAME, NO_SUCH_TYPE, OK, RULE_SOURCES_DIFFER, VAR_NOT_DECLARED |
Constructor Summary | |
---|---|
ValueMember(ValueTuple tuple,
DeclMember decl)
Creating a new instance with the specified type. |
Method Summary | |
---|---|
protected void |
apply(HandlerExpr expr)
This method is used inside of the method rawSetExprAsText(String text) to initialize the attribute members of Java class type. |
void |
apply(ValueMember rightSide,
AttrContext context)
Transformation application |
void |
apply(ValueMember rightSide,
AttrContext context,
boolean allowVariableWithoutValue)
Transform application like apply( ValueMember, AttrContext), additionally do allow using variables without value as value of attribute member. |
void |
apply(ValueMember rightSide,
AttrContext context,
boolean allowVariableWithoutValue,
boolean equalVariableName)
Transform application like apply( ValueMember, AttrContext), additionally do allow using variables without value as value of attribute member. |
boolean |
canMatchTo(ValueMember target,
ContextView context)
Check if matching is possible into 'target' within the match context 'context'. |
protected void |
checkInContext(HandlerExpr hExpr,
AttrContext ctx)
Checking the validity of the expression 'hExpr' relative to the context 'ctx'. |
void |
checkValidity()
Checking the current expression validity relative to my tuple's context. |
void |
checkValidity(HandlerExpr hExpr)
|
boolean |
compareTo(ValueMember member)
|
void |
copy(ValueMember fromInstance)
Copying the contents of a single entry instance into another. |
boolean |
equals(ValueMember testObject)
Tests if the handler expressions are equal. |
java.util.Vector<java.lang.String> |
getAllVariableNamesOfExpression()
|
java.lang.String |
getAttrHandlerExceptionMsg()
|
java.util.Vector<Node> |
getChildrenOfExpression()
|
protected ContextView |
getContext()
Getting the context of this value. |
protected DeclMember |
getDecl()
Getting the declaration for this value |
AttrTypeMember |
getDeclaration()
Retrieving the type. |
java.lang.String |
getErrorMsg()
|
HandlerExpr |
getExpr()
Retrieving the expression (value) contained in this member. |
java.lang.Object |
getExprAsObject()
Retrieving the value of an entry. |
java.lang.String |
getExprAsText()
Returns the textual representation of the expression. |
AttrHandler |
getHandler()
Getting the handler of this value. |
AttrTuple |
getHoldingTuple()
Returns the tuple that contains this member. |
java.lang.String |
getName()
Getting the name of this value member. |
protected ValueTuple |
getTuple()
Getting the instance tuple that contains this value as a member. |
protected HandlerType |
getType()
Getting the type of this value. |
java.lang.String |
getValidityReport()
Returns a text describing the errors in this member, or null if the member is correct. |
boolean |
isEmpty()
Check if no expression yet. |
boolean |
isSet()
Check if set. |
boolean |
isTransient()
|
boolean |
isValid()
Testing if the member is consistent and complete. |
java.lang.String |
matchTo(ValueMember target,
ContextView context)
Perform matching with 'target' in the match context 'context'. |
protected HandlerExpr |
rawGetExpr()
|
protected void |
rawSetExpr(HandlerExpr expr)
|
protected void |
rawSetExprAsObject(java.lang.Object obj)
|
protected void |
rawSetExprAsText(java.lang.String exprText)
Setting the value. |
protected void |
setCheckedExpr(HandlerExpr expr)
Setting the value and checking validity. |
void |
setExpr(HandlerExpr expr)
Setting the value and fire event. |
void |
setExprAsEvaluatedText(java.lang.String exprText)
Setting the value. |
void |
setExprAsObject(java.lang.Object obj)
Setting the value. |
void |
setExprAsText(java.lang.String exprText)
Setting the value. |
void |
setTransient(boolean trans)
|
java.lang.String |
toString()
|
void |
typeChanged()
|
void |
XreadObject(XMLHelper h)
|
void |
XwriteObject(XMLHelper h)
|
Methods inherited from class agg.attribute.impl.Member |
---|
fireChanged, getIndexInTuple |
Methods inherited from class agg.attribute.impl.AttrObject |
---|
defaultToString, err, err, getInstRepr, log, log, log, logEnteredMethod, logPrintln, logPrintln, stdoutPrintOnEnter, stdoutPrintOnExit, update, warn, warn, warn, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface agg.attribute.AttrMember |
---|
getIndexInTuple |
Field Detail |
---|
public static final java.lang.String EMPTY_VALUE_SYMBOL
protected DeclMember decl
protected ValueTuple tuple
protected HandlerExpr expression
protected java.lang.String expressionText
protected java.lang.Object expressionObject
protected transient java.lang.Exception currentException
protected transient java.lang.String errorMsg
protected boolean isTransient
Constructor Detail |
---|
public ValueMember(ValueTuple tuple, DeclMember decl)
tuple
- Instance tuple that this value is a member of.decl
- Declaration for this member.Method Detail |
---|
public java.lang.String getErrorMsg()
public boolean isValid()
AttrMember
isValid
in interface AttrMember
public java.lang.String getValidityReport()
AttrMember
getValidityReport
in interface AttrMember
public AttrTypeMember getDeclaration()
AttrInstanceMember
getDeclaration
in interface AttrInstanceMember
public java.lang.Object getExprAsObject()
AttrInstanceMember
getExprAsObject
in interface AttrInstanceMember
public HandlerExpr getExpr()
AttrInstanceMember
getExpr
in interface AttrInstanceMember
public java.lang.String getExprAsText()
AttrInstanceMember
getExprAsText
in interface AttrInstanceMember
public void setExpr(HandlerExpr expr)
setExpr
in interface AttrInstanceMember
public void setExprAsObject(java.lang.Object obj)
setExprAsObject
in interface AttrInstanceMember
obj
- Any object instance.protected void rawSetExprAsObject(java.lang.Object obj)
public void setExprAsText(java.lang.String exprText)
setExprAsText
in interface AttrInstanceMember
exprText
- textual expression representation;protected void rawSetExprAsText(java.lang.String exprText)
public void setExprAsEvaluatedText(java.lang.String exprText)
setExprAsEvaluatedText
in interface AttrInstanceMember
exprText
- textual expression representation;public void typeChanged()
public boolean isEmpty()
public boolean isSet()
isSet
in interface AttrInstanceMember
protected void apply(HandlerExpr expr)
expr
- public void apply(ValueMember rightSide, AttrContext context)
rightSide
- The expression from the right rule sidecontext
- The match context.public void apply(ValueMember rightSide, AttrContext context, boolean allowVariableWithoutValue)
public void apply(ValueMember rightSide, AttrContext context, boolean allowVariableWithoutValue, boolean equalVariableName)
public boolean canMatchTo(ValueMember target, ContextView context)
public java.lang.String matchTo(ValueMember target, ContextView context)
public void copy(ValueMember fromInstance)
public boolean equals(ValueMember testObject)
public boolean compareTo(ValueMember member)
public java.lang.String toString()
toString
in class AttrObject
public AttrTuple getHoldingTuple()
AttrMember
getHoldingTuple
in interface AttrMember
getHoldingTuple
in class Member
protected ValueTuple getTuple()
protected ContextView getContext()
protected DeclMember getDecl()
public AttrHandler getHandler()
protected HandlerType getType()
public java.lang.String getName()
getName
in interface AttrMember
public java.util.Vector<java.lang.String> getAllVariableNamesOfExpression()
public java.util.Vector<Node> getChildrenOfExpression()
protected HandlerExpr rawGetExpr()
protected void rawSetExpr(HandlerExpr expr)
protected void setCheckedExpr(HandlerExpr expr)
public void checkValidity()
public void checkValidity(HandlerExpr hExpr)
protected void checkInContext(HandlerExpr hExpr, AttrContext ctx)
public java.lang.String getAttrHandlerExceptionMsg()
public void setTransient(boolean trans)
public boolean isTransient()
public void XwriteObject(XMLHelper h)
XwriteObject
in interface XMLObject
public void XreadObject(XMLHelper h)
XreadObject
in interface XMLObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |