public class ReflectiveVisitor extends UMod.Visitor
model
,
the XXXModifier and Type | Field and Description |
---|---|
protected UMod.ClassDef |
curcd |
protected UMod.FieldDef |
curfd |
protected UMod.Forest |
curforest |
protected Object |
model |
protected static Object[] |
NO_ARGS |
protected static Class[] |
NO_PARAMS |
UMod.FieldDef |
referingField |
Object |
referingObject |
protected Set<Object> |
visited |
result
Constructor and Description |
---|
ReflectiveVisitor(UMod.Forest f) |
Modifier and Type | Method and Description |
---|---|
void |
action(UMod.ClassDef cd)
Is possibly called MORE THAN once for each object.
|
void |
action(UMod.FieldDef fd)
Descend to field value:
1) read object into "model" 2) set curfd to field 3) call match on the type |
void |
action(UMod.T_power type) |
void |
action(UMod.T_reference type) |
void |
action(UMod.T_seq type) |
static Object |
getFieldValue(Object o,
UMod.FieldDef fd)
Reads the content of a given field by applying java.lang.reflect methods.
|
UMod.ClassDef |
getSpecialization(Object o)
Finds the most specialized UMOd class definition for a certain object.
|
void |
matchModel(UMod.ClassDef cd,
Object o) |
void |
modelAction(Object o)
Action for each model object, may be over-ridden by user of this Visitor.
|
protected void |
visitFields(UMod.ClassDef cd)
Descend to fields of the current model "model"; this is done
ONLY ONCE for each model.
Fields of superclass are visited BEFORE All fields are visited via their "action()" method This in turn calls "match()" on the TYPE of the field, which finally leads back to a match of the class definition. |
protected UMod.Forest curforest
protected UMod.ClassDef curcd
protected UMod.FieldDef curfd
public Object referingObject
public UMod.FieldDef referingField
protected Object model
protected static final Class[] NO_PARAMS
protected static final Object[] NO_ARGS
public ReflectiveVisitor(UMod.Forest f)
public void matchModel(UMod.ClassDef cd, Object o)
public static Object getFieldValue(Object o, UMod.FieldDef fd)
public UMod.ClassDef getSpecialization(Object o)
public void modelAction(Object o)
public void action(UMod.ClassDef cd)
action
in class UMod.Visitor
protected void visitFields(UMod.ClassDef cd)
public void action(UMod.FieldDef fd)
action
in class UMod.Visitor
public void action(UMod.T_reference type)
action
in class UMod.Visitor
public void action(UMod.T_seq type)
action
in class UMod.Visitor
public void action(UMod.T_power type)
action
in class UMod.Visitor
see also the complete user documentation .