< prev index next > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java
Print this page
import com.sun.tools.javac.code.Scope.NamedImportScope;
import com.sun.tools.javac.code.Scope.StarImportScope;
import com.sun.tools.javac.code.Scope.WriteableScope;
import com.sun.tools.javac.code.Source.Feature;
import com.sun.tools.javac.comp.Annotate.AnnotationTypeMetadata;
+ import com.sun.tools.javac.jvm.Target;
import com.sun.tools.javac.tree.*;
import com.sun.tools.javac.util.*;
import com.sun.tools.javac.util.DefinedBy.Api;
import com.sun.tools.javac.code.Symbol.*;
} else {
ct.interfaces_field = interfaces.toList();
ct.all_interfaces_field = (all_interfaces == null)
? ct.interfaces_field : all_interfaces.toList();
}
-
/* it could be that there are already some symbols in the permitted list, for the case
* where there are subtypes in the same compilation unit but the permits list is empty
* so don't overwrite the permitted list if it is not empty
*/
if (!permittedSubtypeSymbols.isEmpty()) {
}
if (tree.sym.isAnnotationType()) {
Assert.check(tree.sym.isCompleted());
tree.sym.setAnnotationTypeMetadata(new AnnotationTypeMetadata(tree.sym, annotate.annotationTypeSourceCompleter()));
}
+
+ if (tree.sym != syms.objectType.tsym) {
+ if ((tree.sym.flags() & (ABSTRACT | INTERFACE | VALUE_CLASS)) == 0) {
+ tree.sym.flags_field |= IDENTITY_TYPE;
+ }
+ if ((tree.sym.flags() & (ABSTRACT | INTERFACE)) == ABSTRACT) {
+ if (types.isIdentityType(tree.sym.type)) {
+ tree.sym.flags_field |= IDENTITY_TYPE;
+ }
+ }
+ }
}
private void addAccessor(JCVariableDecl tree, Env<AttrContext> env) {
MethodSymbol implSym = lookupMethod(env.enclClass.sym, tree.sym.name, List.nil());
RecordComponent rec = ((ClassSymbol) tree.sym.owner).getRecordComponent(tree.sym);
< prev index next >