Package eu.bandm.tools.d2d2.base
Class Resolver.ReferenceResolver
java.lang.Object
eu.bandm.tools.d2d2.model.MATCH_ONLY_00
eu.bandm.tools.d2d2.model.Rewrite
eu.bandm.tools.d2d2.base.Resolver.ReferenceResolver
- All Implemented Interfaces:
Rewriter
- Enclosing class:
- Resolver
Here all declaration objects, all items and all imported modules are already
rewritten. What really has to be re-written are the expressions which
make the substitution value in an import-rewrite,
plus those which are contained in the field .value of all XRegExp.
Visiting starts with the (externally requested) top-level module and follows the import statements.
Visiting starts with the (externally requested) top-level module and follows the import statements.
-
Field Summary
Modifier and TypeFieldDescriptionprotected ImportItem
protected String
protected Module
protected boolean
Fields inherited from class eu.bandm.tools.d2d2.model.MATCH_ONLY_00
_visitor_debug_stream, partial
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
action
(ImportItem item) void
void
void
action
(TagsRegExp x) protected void
checkDefinitionType
(Definition def, Location<XMLDocumentIdentifier> loc, boolean isInsertion) protected void
checkInsertion
(Expression exp, String origText, Insertion callingInsertion) Called if a substitution goes to a reference or "#none", in case the substituted ref is an argument to a "@" FIXME später raus, "@" wird kompositional in NEUEM Algorithmus!protected Expression
copyImplicit
(Expression expr0, Reference orig) FIXME -- BETTER: realize "#implicit" as an OPERATOR, then no special copy action would be necessary.protected Expression
resolveRefText
(Reference ref, Insertion callingInsertion) Resolve the source text of a reference to a declaration and store this in "resolved".(package private) void
Methods inherited from class eu.bandm.tools.d2d2.model.Rewrite
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, action, action, action, action, action, action, breakLoop, descend_Module$definitions, descend_Module$imports, descend_TagsRegExp$localdefs, getResult, isMulti, lookUp, putToCache, revert, rewrite, rewrite_typed, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, rewriteFields, substitute, substitute_empty, useCache
Methods inherited from class eu.bandm.tools.d2d2.model.MATCH_ONLY_00
_visitor_trace, action, action, action, action, compile, descend_Alt$on, descend_ImportItem$globalSubsts, descend_ImportItem$localSubsts, descend_Module$modules, descend_Perm$on, descend_Seq$on, foreignObject, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, nomatch
-
Field Details
-
currentmodule
-
currentitem
-
currentlocalcontext
-
inTagsRegExp
protected boolean inTagsRegExp
-
-
Constructor Details
-
ReferenceResolver
protected ReferenceResolver()
-
-
Method Details
-
action
-
action
-
action
-
action
-
checkInsertion
Called if a substitution goes to a reference or "#none", in case the substituted ref is an argument to a "@" FIXME später raus, "@" wird kompositional in NEUEM Algorithmus! -
checkDefinitionType
protected void checkDefinitionType(Definition def, Location<XMLDocumentIdentifier> loc, boolean isInsertion) -
copyImplicit
FIXME -- BETTER: realize "#implicit" as an OPERATOR, then no special copy action would be necessary. -
resolveRefText
Resolve the source text of a reference to a declaration and store this in "resolved".
First look, whether the name of the reference appears in a global or local substitution which comes with the import statement. (These have already been visited and resolved !?!)
Otherwise, set ".resolved" to an XRegExp/Enumeration (declaration) either in an imported module, or in the same module as the expression is. In case the ref is subjet to INSERTION, than a error is generated iff the rewriting does not go again to a reference. (NB The info about the error cause (i.e. the wrong re-writing) is only known here, NOT on the level of "action(Insertion)"! Therefore the resp. error message generation had to be dislocated to here!)- Parameters:
ref
- the Reference to resolvecallingInsertion
- the Insertion expression directly containing ref, or null.
-
XXdumpone
-
action
-