|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.codegen.merge.java.facade.FacadeVisitor org.eclipse.emf.codegen.merge.java.JPatternDictionary
public class JPatternDictionary
A dictionary of signatures and JNode
s.
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,JAbstractType> |
abstractTypeMap
|
protected java.util.Map<java.lang.String,JAnnotation> |
annotationMap
|
protected java.util.Map<java.lang.String,JAnnotationTypeMember> |
annotationTypeMemberMap
|
protected static java.util.regex.Pattern |
COMMENT
|
protected JControlModel |
controlModel
|
protected static boolean |
DEBUG
|
protected java.util.Map<java.lang.String,JEnumConstant> |
enumConstantMap
|
protected java.util.Map<java.lang.String,JField> |
fieldMap
|
protected java.util.Map<java.lang.String,JImport> |
importMap
|
protected java.util.Map<java.lang.String,JInitializer> |
initializerMap
|
protected JPackage |
jPackage
|
protected java.util.Map<java.lang.String,java.util.Collection<JNode>> |
markupMap
|
protected java.util.Map<java.lang.String,JMethod> |
methodMap
|
protected static java.lang.Object[] |
NO_ARGUMENTS
|
protected java.util.Map<JNode,java.lang.String> |
nodeIdentifierMap
|
protected java.util.Set<java.lang.String> |
noImportSet
|
Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.FacadeVisitor |
---|
rootNode |
Constructor Summary | |
---|---|
JPatternDictionary(JCompilationUnit compilationUnit,
JControlModel controlModel)
|
Method Summary | ||
---|---|---|
protected void |
beforeVisit(JNode node)
|
|
protected java.lang.String |
checkSelection(java.lang.String selection,
JControlModel.DictionaryPattern dictionaryPattern,
JNode node)
Checks the selection to fix the problem with facade implementations that assign wrong javadoc to the node. |
|
protected static
|
dumpMap(java.lang.String lineIndent,
java.util.Map<K,V> map)
|
|
protected void |
dumpMaps()
|
|
java.util.Map<java.lang.String,JAbstractType> |
getAbstractTypeMap()
|
|
java.util.Map<java.lang.String,JAnnotation> |
getAnnotationMap()
|
|
java.util.Map<java.lang.String,JAnnotationTypeMember> |
getAnnotationTypeMemberMap()
|
|
protected java.lang.String |
getDefaultNodeIdentifier(JNode node)
|
|
java.util.Map<java.lang.String,JEnumConstant> |
getEnumConstantMap()
|
|
java.util.Map<java.lang.String,JField> |
getFieldMap()
|
|
java.util.Map<java.lang.String,JImport> |
getImportMap()
|
|
java.util.Map<java.lang.String,JInitializer> |
getInitializerMap()
|
|
JPackage |
getJPackage()
|
|
java.util.Map<java.lang.String,java.util.Collection<JNode>> |
getMarkupMap()
|
|
java.util.Map<java.lang.String,JMethod> |
getMethodMap()
|
|
JNode |
getNode(java.lang.String nodeIdentifier)
|
|
java.lang.String |
getNodeIdentifier(JNode node)
|
|
java.util.Map<java.lang.String,? extends JNode> |
getNodeMap(JNode node)
|
|
protected java.util.Set<java.lang.String> |
getNoImporterSet()
|
|
boolean |
isMarkedUp(java.util.regex.Pattern markupPattern,
JNode node)
|
|
boolean |
isMarkedUp(java.util.regex.Pattern markupPattern,
java.util.regex.Pattern parentMarkupPattern,
JNode node)
Determines if the node is marked up based on the node and parent markup. |
|
boolean |
isNoImport(JImport jImport)
|
|
protected void |
markupNode(java.lang.String selection,
JControlModel.DictionaryPattern dictionaryPattern,
JNode node)
Matches pattern in dictionary pattern against selection, and marks up node with all matching groups. |
|
protected void |
markupNode(java.lang.String markup,
JNode node)
Marks up node with the given markup string. |
|
void |
reset()
Resets this JPatternDictionary. |
|
protected boolean |
visit(JAbstractType abstractType)
|
|
protected boolean |
visit(JAnnotation annotation)
|
|
protected boolean |
visit(JAnnotationTypeMember annotationTypeMember)
|
|
protected boolean |
visit(JCompilationUnit compilationUnit)
|
|
protected boolean |
visit(JEnumConstant enumConstant)
|
|
protected boolean |
visit(JField field)
|
|
protected boolean |
visit(JImport jImport)
|
|
protected boolean |
visit(JInitializer initializer)
|
|
protected boolean |
visit(JMethod method)
|
|
protected boolean |
visit(JPackage jPackage)
|
Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.FacadeVisitor |
---|
afterVisit, afterVisitChildren, basicVisit, dispatch, getRootNode, start, visit, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.util.regex.Pattern COMMENT
protected static final java.lang.Object[] NO_ARGUMENTS
protected static final boolean DEBUG
protected JControlModel controlModel
protected JPackage jPackage
protected java.util.Map<java.lang.String,JAnnotation> annotationMap
protected java.util.Map<java.lang.String,JAnnotationTypeMember> annotationTypeMemberMap
protected java.util.Map<java.lang.String,JEnumConstant> enumConstantMap
protected java.util.Map<java.lang.String,JImport> importMap
protected java.util.Map<java.lang.String,JAbstractType> abstractTypeMap
protected java.util.Map<java.lang.String,JInitializer> initializerMap
protected java.util.Map<java.lang.String,JField> fieldMap
protected java.util.Map<java.lang.String,JMethod> methodMap
protected java.util.Map<java.lang.String,java.util.Collection<JNode>> markupMap
protected java.util.Set<java.lang.String> noImportSet
protected java.util.Map<JNode,java.lang.String> nodeIdentifierMap
Constructor Detail |
---|
public JPatternDictionary(JCompilationUnit compilationUnit, JControlModel controlModel)
Method Detail |
---|
public void reset()
FacadeVisitor.start(JNode)
passing a compilation unit to reuse this instance.
public JPackage getJPackage()
public java.util.Map<java.lang.String,? extends JNode> getNodeMap(JNode node)
public java.util.Map<java.lang.String,JImport> getImportMap()
public java.util.Map<java.lang.String,JAbstractType> getAbstractTypeMap()
public java.util.Map<java.lang.String,JInitializer> getInitializerMap()
public java.util.Map<java.lang.String,JField> getFieldMap()
public java.util.Map<java.lang.String,JMethod> getMethodMap()
public java.util.Map<java.lang.String,JAnnotation> getAnnotationMap()
public java.util.Map<java.lang.String,JAnnotationTypeMember> getAnnotationTypeMemberMap()
public java.util.Map<java.lang.String,JEnumConstant> getEnumConstantMap()
public java.util.Map<java.lang.String,java.util.Collection<JNode>> getMarkupMap()
public boolean isMarkedUp(java.util.regex.Pattern markupPattern, java.util.regex.Pattern parentMarkupPattern, JNode node)
If both patterns are null
, the node is marked up.
If both patterns are not null
, the node is marked up if the node itself and its
parent is marked up. If the node does not have a parent, the node is marked up if the node itself is marked up.
If only markupPattern
or parentMarkupPattern
is set, the node is marked up
if the node or its parent is marked up respectively.
markupPattern
- parentMarkupPattern
- node
- isMarkedUp(Pattern, JNode)
public boolean isMarkedUp(java.util.regex.Pattern markupPattern, JNode node)
protected java.util.Set<java.lang.String> getNoImporterSet()
public boolean isNoImport(JImport jImport)
protected boolean visit(JCompilationUnit compilationUnit)
visit
in class FacadeVisitor
protected boolean visit(JPackage jPackage)
visit
in class FacadeVisitor
protected boolean visit(JAbstractType abstractType)
visit
in class FacadeVisitor
protected boolean visit(JImport jImport)
visit
in class FacadeVisitor
protected boolean visit(JInitializer initializer)
visit
in class FacadeVisitor
protected boolean visit(JField field)
visit
in class FacadeVisitor
protected boolean visit(JMethod method)
visit
in class FacadeVisitor
protected boolean visit(JAnnotation annotation)
visit
in class FacadeVisitor
protected boolean visit(JAnnotationTypeMember annotationTypeMember)
visit
in class FacadeVisitor
protected boolean visit(JEnumConstant enumConstant)
visit
in class FacadeVisitor
protected void beforeVisit(JNode node)
beforeVisit
in class FacadeVisitor
protected java.lang.String checkSelection(java.lang.String selection, JControlModel.DictionaryPattern dictionaryPattern, JNode node)
selection
- dictionaryPattern
- node
-
null
if the node should be skippedprotected void markupNode(java.lang.String selection, JControlModel.DictionaryPattern dictionaryPattern, JNode node)
If pattern matches selection, but no groups are defined, node is marked up with dictionary pattern name.
selection
- dictionaryPattern
- node
- protected void markupNode(java.lang.String markup, JNode node)
markup
- node
- protected void dumpMaps()
protected static <K,V> java.lang.String dumpMap(java.lang.String lineIndent, java.util.Map<K,V> map)
public java.lang.String getNodeIdentifier(JNode node)
protected java.lang.String getDefaultNodeIdentifier(JNode node)
public JNode getNode(java.lang.String nodeIdentifier)
|
Copyright 2001-2012 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |