Package eu.bandm.tools.umod
Class ReflectiveVisitor
java.lang.Object
eu.bandm.tools.umod.UMod.Visitor
eu.bandm.tools.umod.ReflectiveVisitor
Realizes a visitor which is driven by the concrete contents of a
certain instance of a umod model.
The currently visited object is stored in
The currently visited object is stored in
model,
the XXX-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected UMod.ClassDefprotected UMod.FieldDefprotected UMod.Forestprotected Objectprotected static final Object[]protected static final Class[]Fields inherited from class eu.bandm.tools.umod.UMod.Visitor
result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaction(UMod.ClassDef cd) Is possibly called MORE THAN once for each object.voidaction(UMod.FieldDef fd) Descend to field value:
1) read object into "model"
2) set curfd to field
3) call match on the typevoidaction(UMod.T_power type) voidaction(UMod.T_reference type) voidaction(UMod.T_seq type) static ObjectgetFieldValue(Object o, UMod.FieldDef fd) Reads the content of a given field by applying java.lang.reflect methods.Finds the most specialized UMOd class definition for a certain object.voidmatchModel(UMod.ClassDef cd, Object o) voidAction for each model object, may be over-ridden by user of this Visitor.protected voidDescend 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.Methods inherited from class eu.bandm.tools.umod.UMod.Visitor
action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, descend_Forest$extBySequence, getResult, match
-
Field Details
-
curforest
-
curcd
-
curfd
-
referingObject
-
referingField
-
model
-
visited
-
NO_PARAMS
-
NO_ARGS
-
-
Constructor Details
-
ReflectiveVisitor
-
-
Method Details
-
matchModel
-
getFieldValue
Reads the content of a given field by applying java.lang.reflect methods. -
getSpecialization
Finds the most specialized UMOd class definition for a certain object. Uses the naming! -
modelAction
Action for each model object, may be over-ridden by user of this Visitor. Is possibly called MORE THAN once for each object, before descending to the fields. May read "curfd", "curcd", "referingObject" as the objects and umod definitions which LEAD TO visiting this model object. -
action
Is possibly called MORE THAN once for each object. Calls "modelAction()" and then descends to the fields.
reads global field "model" and writes "referingObject".- Overrides:
actionin classUMod.Visitor
-
visitFields
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. -
action
Descend to field value:
1) read object into "model"
2) set curfd to field
3) call match on the type- Overrides:
actionin classUMod.Visitor
-
action
- Overrides:
actionin classUMod.Visitor
-
action
- Overrides:
actionin classUMod.Visitor
-
action
- Overrides:
actionin classUMod.Visitor
-