@@ -2253,9 +2253,15 @@ public void endVisit(TypeDeclaration node) {
22532253 for (Iterator iter = node .bodyDeclarations ().iterator (); iter .hasNext ();) {
22542254 ASTNode element = (ASTNode ) iter .next ();
22552255 if (element instanceof Initializer ) {
2256+ if (getJ2STag ((Initializer ) element , "@j2sIgnore" ) != null ) {
2257+ continue ;
2258+ }
22562259 needReturn = true ;
22572260 } else if (element instanceof FieldDeclaration ) {
22582261 FieldDeclaration field = (FieldDeclaration ) element ;
2262+ if (getJ2STag (field , "@j2sIgnore" ) != null ) {
2263+ continue ;
2264+ }
22592265 if ((field .getModifiers () & Modifier .STATIC ) != 0 ) {
22602266 needReturn = true ;
22612267 } else if (node .isInterface ()) {
@@ -2371,12 +2377,18 @@ public void endVisit(TypeDeclaration node) {
23712377 ASTNode element = (ASTNode ) iter .next ();
23722378 if (element instanceof FieldDeclaration ) {
23732379 FieldDeclaration field = (FieldDeclaration ) element ;
2380+ if (getJ2STag (field , "@j2sIgnore" ) != null ) {
2381+ continue ;
2382+ }
23742383 needPreparation = isFieldNeedPreparation (field );
23752384 if (needPreparation ) {
23762385 break ;
23772386 }
23782387 } else if (element instanceof Initializer ) {
23792388 Initializer init = (Initializer ) element ;
2389+ if (getJ2STag (init , "@j2sIgnore" ) != null ) {
2390+ continue ;
2391+ }
23802392 if ((init .getModifiers () & Modifier .STATIC ) == 0 ) {
23812393 needPreparation = true ;
23822394 break ;
@@ -2389,12 +2401,18 @@ public void endVisit(TypeDeclaration node) {
23892401 ASTNode element = (ASTNode ) iter .next ();
23902402 if (element instanceof FieldDeclaration ) {
23912403 FieldDeclaration field = (FieldDeclaration ) element ;
2404+ if (getJ2STag (field , "@j2sIgnore" ) != null ) {
2405+ continue ;
2406+ }
23922407 if (node .isInterface () || !isFieldNeedPreparation (field )) {
23932408 continue ;
23942409 }
23952410 element .accept (this );
23962411 } else if (element instanceof Initializer ) {
23972412 Initializer init = (Initializer ) element ;
2413+ if (getJ2STag (init , "@j2sIgnore" ) != null ) {
2414+ continue ;
2415+ }
23982416 if ((init .getModifiers () & Modifier .STATIC ) == 0 ) {
23992417 element .accept (this );
24002418 }
@@ -2430,6 +2448,9 @@ public void endVisit(TypeDeclaration node) {
24302448 element .accept (this );
24312449 }
24322450 } else if (element instanceof Initializer ) {
2451+ if (getJ2STag ((Initializer ) element , "@j2sIgnore" ) != null ) {
2452+ continue ;
2453+ }
24332454 if (staticCount != -1 ) {
24342455 buffer .append (");\r \n " );
24352456 staticCount = -1 ;
@@ -2441,6 +2462,9 @@ public void endVisit(TypeDeclaration node) {
24412462 }
24422463 } else if (element instanceof FieldDeclaration ) {
24432464 FieldDeclaration field = (FieldDeclaration ) element ;
2465+ if (getJ2STag (field , "@j2sIgnore" ) != null ) {
2466+ continue ;
2467+ }
24442468 if ((field .getModifiers () & Modifier .STATIC ) != 0 ) {
24452469 List fragments = field .fragments ();
24462470 for (int j = 0 ; j < fragments .size (); j ++) {
@@ -2786,6 +2810,9 @@ public static void main(String[] args) {
27862810 continue ;
27872811 }
27882812 FieldDeclaration fieldDeclaration = (FieldDeclaration ) element ;
2813+ if (getJ2STag (fieldDeclaration , "@j2sIgnore" ) != null ) {
2814+ continue ;
2815+ }
27892816 if (isFieldNeedPreparation (fieldDeclaration )) {
27902817 visitWith (fieldDeclaration , true );
27912818 continue ;
0 commit comments