Package eu.bandm.tools.umod.runtime
Class OptimizingVisitor
java.lang.Object
eu.bandm.tools.umod.runtime.OptimizingVisitor
- Direct Known Subclasses:
MATCH_ONLY_00
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
(package private) static interface
(package private) class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String[]
protected void
calculateFlags
(Class<?> ownclass, Set<Class<?>> overwritten) protected void
Re-defined in the generated code according to the flavour of visitor.protected void
protected void
protected void
protected static void
Looks for all methods with name "methodname" in class "cls", and inserts the class of their 0th (and only) argument into classes.compile()
The user-derived visitor must not be declared final and CURRENTLY must have one parameter-les constructor, which is used by the code compile here.Overwritten at one single place, namely in basematcher.Overwritten at one single place, namely in basematcher.Overwritten at one single place, namely in basematcher.protected int
getKey()
Overwritten with generated code to return visitor register key number.protected Class<?>
Is overwritten by the umod compiler to the lowest generated class.protected static void
readSccData
(Class<?> generatedRootClass, String filename, Map<Integer, Map<Class<?>, Integer>> class2scc, Map<Integer, Multimap<String, Integer>> field2sccs, Map<Integer, Multimap<Class<?>, Integer>> class2reachedSccs)
-
Field Details
-
METHODNAMEPREFIX_DESCEND
- See Also:
-
SUFFIX_FILENAME_SCC_DATA
- See Also:
-
haspre
protected boolean haspre -
haspost
protected boolean haspost -
hasdescend
protected boolean hasdescend -
METHODNAME_allFields2codeNumber
- See Also:
-
fieldFlags
protected boolean[] fieldFlags -
affectedClasses
-
methodname_action
- See Also:
-
-
Constructor Details
-
OptimizingVisitor
protected OptimizingVisitor()
-
-
Method Details
-
readSccData
-
getLowestGeneratedClass
Is overwritten by the umod compiler to the lowest generated class. A "null" value indicates a non-user-defined visitor, e.g. Dumper or XML serializer, which is never subject to optimization. -
getKey
protected int getKey()Overwritten with generated code to return visitor register key number. -
allFields2codeNumber
-
get_class2scc
Overwritten at one single place, namely in basematcher. -
get_field2sccs
Overwritten at one single place, namely in basematcher. -
get_class2reachedSccs
Overwritten at one single place, namely in basematcher. -
compile
The user-derived visitor must not be declared final and CURRENTLY must have one parameter-les constructor, which is used by the code compile here. This also forbids inner claases reading context parameters. -
collectFlags
protected void collectFlags()Re-defined in the generated code according to the flavour of visitor. Calls "collectFlags_action()", "collectFlags_actionDorewrite()", etc. depending on what method names have to be collected.
(( Could be "abstract", but this would require a dummy implementation for "Dumper", "XML-(de-)serializer", etc. )) -
collectFlags_action
protected void collectFlags_action() -
collectFlags_actionRewritefields
protected void collectFlags_actionRewritefields() -
collectFlags_actionPreDescendPost
protected void collectFlags_actionPreDescendPost() -
collectMethods
protected static void collectMethods(Class<?> cls, Class<?> upto, Set<Class<?>> classes, String methodname) Looks for all methods with name "methodname" in class "cls", and inserts the class of their 0th (and only) argument into classes. Does so recursively with the superclasses up to (not including) "upto". -
calculateFlags
-