< prev index next > make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java
Print this page
"Ljdk/internal/javac/Restricted+Annotation;";
private static final String VALUE_BASED_ANNOTATION =
"Ljdk/internal/ValueBased;";
private static final String VALUE_BASED_ANNOTATION_INTERNAL =
"Ljdk/internal/ValueBased+Annotation;";
+ private static final String MIGRATED_VALUE_CLASS_ANNOTATION =
+ "Ljdk/internal/MigratedValueClass;";
+ private static final String MIGRATED_VALUE_CLASS_ANNOTATION_INTERNAL =
+ "Ljdk/internal/MigratedValueClass+Annotation;";
public static final Set<String> HARDCODED_ANNOTATIONS = new HashSet<>(
List.of("Ljdk/Profile+Annotation;",
"Lsun/Proprietary+Annotation;",
PREVIEW_FEATURE_ANNOTATION_OLD,
PREVIEW_FEATURE_ANNOTATION_NEW,
VALUE_BASED_ANNOTATION,
+ MIGRATED_VALUE_CLASS_ANNOTATION,
RESTRICTED_ANNOTATION));
private void stripNonExistentAnnotations(LoadDescriptions data) {
Set<String> allClasses = data.classes.name2Class.keySet();
data.modules.values().forEach(mod -> {
//the non-public ValueBased annotation will not be available in ct.sym,
//replace with purely synthetic javac-internal annotation:
annotationType = VALUE_BASED_ANNOTATION_INTERNAL;
}
+ if (MIGRATED_VALUE_CLASS_ANNOTATION.equals(annotationType)) {
+ //the non-public MigratedValueClass annotation will not be available in ct.sym,
+ //replace with purely synthetic javac-internal annotation:
+ annotationType = MIGRATED_VALUE_CLASS_ANNOTATION_INTERNAL;
+ }
+
if (RESTRICTED_ANNOTATION.equals(annotationType)) {
//the non-public Restricted annotation will not be available in ct.sym,
//replace with purely synthetic javac-internal annotation:
annotationType = RESTRICTED_ANNOTATION_INTERNAL;
}
if (((FieldDescription) feature).descriptor.equals("C")) {
value = (char) (int) value;
}
((FieldDescription) feature).constantValue = value;
break;
+ case "Preload":
case "SourceFile":
//ignore, not needed
break;
case "BootstrapMethods":
//ignore, not needed
< prev index next >