-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add access widening, misc fixes/cleanup
- Loading branch information
1 parent
dcb7d2d
commit 8b6e32e
Showing
6 changed files
with
221 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package nilloader; | ||
|
||
import java.util.HashMap; | ||
import java.util.HashSet; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
import org.cadixdev.bombe.type.signature.FieldSignature; | ||
import org.cadixdev.bombe.type.signature.MethodSignature; | ||
|
||
class WidenSet { | ||
|
||
public final Set<String> widenClasses = new HashSet<>(); | ||
public final Map<String, Set<MethodSignature>> widenMethods = new HashMap<>(); | ||
public final Map<String, Set<FieldSignature>> widenFields = new HashMap<>(); | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/nilloader/annotate/OriginallyPackagePrivate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package nilloader.annotate; | ||
|
||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.CLASS; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Marks a member or class as having originally been package-private (default visibility), but it | ||
* was widened to {@code public} by NilGradle's remapping. The access will automatically be widened | ||
* if it is used. | ||
*/ | ||
@Retention(CLASS) | ||
@Target({ TYPE, FIELD, METHOD }) | ||
@Documented | ||
public @interface OriginallyPackagePrivate {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package nilloader.annotate; | ||
|
||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.CLASS; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Marks a member or class as having originally been {@code private}, but it was widened to | ||
* {@code public} by NilGradle's remapping. The access will automatically be widened if it is used. | ||
*/ | ||
@Retention(CLASS) | ||
@Target({ TYPE, FIELD, METHOD }) | ||
@Documented | ||
public @interface OriginallyPrivate {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package nilloader.annotate; | ||
|
||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.CLASS; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Marks a member or class as having originally been {@code protected}, but it was widened to | ||
* {@code public} by NilGradle's remapping. The access will automatically be widened if it is used. | ||
*/ | ||
@Retention(CLASS) | ||
@Target({ TYPE, FIELD, METHOD }) | ||
@Documented | ||
public @interface OriginallyProtected {} |