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 2020import org .eclipse .jdt .core .dom .BodyDeclaration ;
2121import org .eclipse .jdt .core .dom .ClassInstanceCreation ;
2222import org .eclipse .jdt .core .dom .ConstructorInvocation ;
23+ import org .eclipse .jdt .core .dom .EnumConstantDeclaration ;
2324import org .eclipse .jdt .core .dom .IMethodBinding ;
2425import org .eclipse .jdt .core .dom .Javadoc ;
2526import org .eclipse .jdt .core .dom .MethodDeclaration ;
@@ -88,6 +89,22 @@ public boolean visit(ConstructorInvocation node) {
8889 return super .visit (node );
8990 }
9091
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+
91108 /* (non-Javadoc)
92109 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.MethodInvocation)
93110 */
You can’t perform that action at this time.
0 commit comments