Package eu.bandm.tools.tdom.runtime
Class BaseMatcher
java.lang.Object
eu.bandm.tools.tdom.runtime.BaseMatcher
- Direct Known Subclasses:
BaseMatcher
,BaseMatcher
,BaseMatcher
,BaseMatcher
Super class for all generated matcher classes of a tdom model.
A matcher enhances the
(This is different than the strategy currently used in metatool umod, which implies less class loading.)
visitor class
as it is
capable of identifying the class of the visitee dynamically.
For this "double dispatch" is used.
(This is different than the strategy currently used in metatool umod, which implies less class loading.)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
action
(TypedPCData pcdata) Semantic execution; can be overridden by the user when defining a particular visitor.void
Generic entry point, can be called with any model instance which implementsVisitable<V>
, as defined in the generated model.
-
Constructor Details
-
BaseMatcher
public BaseMatcher()
-
-
Method Details
-
action
Semantic execution; can be overridden by the user when defining a particular visitor. Will always be called when aTypedPCData
is reached when traversing the model instance. This default implementation does nothing. -
match
Generic entry point, can be called with any model instance which implementsVisitable<V>
, as defined in the generated model. (The type-safe entry points in the generated classes are prefarable, namely faster and less error-prone.)- Throws:
TypeCastException
- if interface is not implemented.
-