@@ -2253,9 +2253,15 @@ public void endVisit(TypeDeclaration node) {
2253
2253
for (Iterator iter = node .bodyDeclarations ().iterator (); iter .hasNext ();) {
2254
2254
ASTNode element = (ASTNode ) iter .next ();
2255
2255
if (element instanceof Initializer ) {
2256
+ if (getJ2STag ((Initializer ) element , "@j2sIgnore" ) != null ) {
2257
+ continue ;
2258
+ }
2256
2259
needReturn = true ;
2257
2260
} else if (element instanceof FieldDeclaration ) {
2258
2261
FieldDeclaration field = (FieldDeclaration ) element ;
2262
+ if (getJ2STag (field , "@j2sIgnore" ) != null ) {
2263
+ continue ;
2264
+ }
2259
2265
if ((field .getModifiers () & Modifier .STATIC ) != 0 ) {
2260
2266
needReturn = true ;
2261
2267
} else if (node .isInterface ()) {
@@ -2371,12 +2377,18 @@ public void endVisit(TypeDeclaration node) {
2371
2377
ASTNode element = (ASTNode ) iter .next ();
2372
2378
if (element instanceof FieldDeclaration ) {
2373
2379
FieldDeclaration field = (FieldDeclaration ) element ;
2380
+ if (getJ2STag (field , "@j2sIgnore" ) != null ) {
2381
+ continue ;
2382
+ }
2374
2383
needPreparation = isFieldNeedPreparation (field );
2375
2384
if (needPreparation ) {
2376
2385
break ;
2377
2386
}
2378
2387
} else if (element instanceof Initializer ) {
2379
2388
Initializer init = (Initializer ) element ;
2389
+ if (getJ2STag (init , "@j2sIgnore" ) != null ) {
2390
+ continue ;
2391
+ }
2380
2392
if ((init .getModifiers () & Modifier .STATIC ) == 0 ) {
2381
2393
needPreparation = true ;
2382
2394
break ;
@@ -2389,12 +2401,18 @@ public void endVisit(TypeDeclaration node) {
2389
2401
ASTNode element = (ASTNode ) iter .next ();
2390
2402
if (element instanceof FieldDeclaration ) {
2391
2403
FieldDeclaration field = (FieldDeclaration ) element ;
2404
+ if (getJ2STag (field , "@j2sIgnore" ) != null ) {
2405
+ continue ;
2406
+ }
2392
2407
if (node .isInterface () || !isFieldNeedPreparation (field )) {
2393
2408
continue ;
2394
2409
}
2395
2410
element .accept (this );
2396
2411
} else if (element instanceof Initializer ) {
2397
2412
Initializer init = (Initializer ) element ;
2413
+ if (getJ2STag (init , "@j2sIgnore" ) != null ) {
2414
+ continue ;
2415
+ }
2398
2416
if ((init .getModifiers () & Modifier .STATIC ) == 0 ) {
2399
2417
element .accept (this );
2400
2418
}
@@ -2430,6 +2448,9 @@ public void endVisit(TypeDeclaration node) {
2430
2448
element .accept (this );
2431
2449
}
2432
2450
} else if (element instanceof Initializer ) {
2451
+ if (getJ2STag ((Initializer ) element , "@j2sIgnore" ) != null ) {
2452
+ continue ;
2453
+ }
2433
2454
if (staticCount != -1 ) {
2434
2455
buffer .append (");\r \n " );
2435
2456
staticCount = -1 ;
@@ -2441,6 +2462,9 @@ public void endVisit(TypeDeclaration node) {
2441
2462
}
2442
2463
} else if (element instanceof FieldDeclaration ) {
2443
2464
FieldDeclaration field = (FieldDeclaration ) element ;
2465
+ if (getJ2STag (field , "@j2sIgnore" ) != null ) {
2466
+ continue ;
2467
+ }
2444
2468
if ((field .getModifiers () & Modifier .STATIC ) != 0 ) {
2445
2469
List fragments = field .fragments ();
2446
2470
for (int j = 0 ; j < fragments .size (); j ++) {
@@ -2786,6 +2810,9 @@ public static void main(String[] args) {
2786
2810
continue ;
2787
2811
}
2788
2812
FieldDeclaration fieldDeclaration = (FieldDeclaration ) element ;
2813
+ if (getJ2STag (fieldDeclaration , "@j2sIgnore" ) != null ) {
2814
+ continue ;
2815
+ }
2789
2816
if (isFieldNeedPreparation (fieldDeclaration )) {
2790
2817
visitWith (fieldDeclaration , true );
2791
2818
continue ;
0 commit comments