File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/net/sf/j2s/core/astvisitors Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 20
20
import org .eclipse .jdt .core .dom .BodyDeclaration ;
21
21
import org .eclipse .jdt .core .dom .ClassInstanceCreation ;
22
22
import org .eclipse .jdt .core .dom .ConstructorInvocation ;
23
+ import org .eclipse .jdt .core .dom .EnumConstantDeclaration ;
23
24
import org .eclipse .jdt .core .dom .IMethodBinding ;
24
25
import org .eclipse .jdt .core .dom .Javadoc ;
25
26
import org .eclipse .jdt .core .dom .MethodDeclaration ;
@@ -88,6 +89,22 @@ public boolean visit(ConstructorInvocation node) {
88
89
return super .visit (node );
89
90
}
90
91
92
+ /* (non-Javadoc)
93
+ * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.EnumConstantDeclaration)
94
+ */
95
+ public boolean visit (EnumConstantDeclaration node ) {
96
+ IMethodBinding constructorBinding = node .resolveConstructorBinding ();
97
+ String key = constructorBinding .getKey ();
98
+ if (key != null ) {
99
+ key = key .replaceAll ("%?<[^>]+>" , "" );
100
+ }
101
+ if (methodSignature .equals (key )) {
102
+ isReferenced = true ;
103
+ return false ;
104
+ }
105
+ return super .visit (node );
106
+ }
107
+
91
108
/* (non-Javadoc)
92
109
* @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.MethodInvocation)
93
110
*/
You can’t perform that action at this time.
0 commit comments