< prev index next > src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
Print this page
Assert.checkNonNull(metadata);
this.tsym = tsym;
this.metadata = metadata;
}
+ public boolean isValueClass() {
+ return false;
+ }
+
+ public boolean isIdentityClass() {
+ return false;
+ }
+
+ // Does this type need to be preloaded in the context of the referring class ??
+ public boolean requiresLoadableDescriptors(Symbol referringClass) {
+ if (this.tsym == referringClass)
+ return false; // pointless
+ return this.isValueClass() && this.isFinal();
+ }
+
/**
* A subclass of {@link Types.TypeMapping} which applies a mapping recursively to the subterms
* of a given type expression. This mapping returns the original type is no changes occurred
* when recursively mapping the original type's subterms.
*/
@Override
public boolean isReference() {
return true;
}
+ @Override
+ public boolean isValueClass() {
+ return tsym != null && tsym.isValueClass();
+ }
+
+ @Override
+ public boolean isIdentityClass() {
+ return tsym != null && tsym.isIdentityClass();
+ }
+
@Override
public boolean isNullOrReference() {
return true;
}
c.kind = ERR;
c.members_field = new Scope.ErrorScope(c);
}
public ErrorType(Type originalType, TypeSymbol tsym) {
- super(noType, List.nil(), null);
- this.tsym = tsym;
+ super(noType, List.nil(), tsym, List.nil());
this.originalType = (originalType == null ? noType : originalType);
}
public ErrorType(Type originalType, TypeSymbol tsym,
List<TypeMetadata> metadata) {
< prev index next >