< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java

Print this page

        

*** 357,366 **** --- 357,370 ---- public boolean isDeprecated() { return (flags_field & DEPRECATED) != 0; } + public boolean isRecord() { + return (flags_field & RECORD) != 0; + } + public boolean hasDeprecatedAnnotation() { return (flags_field & DEPRECATED_ANNOTATION) != 0; } public boolean isDeprecatedForRemoval() {
*** 389,398 **** --- 393,406 ---- public boolean isInterface() { return (flags() & INTERFACE) != 0; } + public boolean isAbstract() { + return (flags() & ABSTRACT) != 0; + } + public boolean isPrivate() { return (flags_field & Flags.AccessFlags) == PRIVATE; } public boolean isEnum() {
*** 1520,1529 **** --- 1528,1539 ---- * Code generation: * If this is a local variable, its logical slot number. */ public int adr = -1; + public List<Pair<Accessors.Kind, MethodSymbol>> accessors = List.nil(); + /** Construct a variable symbol, given its flags, name, type and owner. */ public VarSymbol(long flags, Name name, Type type, Symbol owner) { super(VAR, flags, name, type, owner); }
*** 1550,1559 **** --- 1560,1586 ---- public Symbol asMemberOf(Type site, Types types) { return new VarSymbol(flags_field, name, types.memberType(site, this), owner); } + @Override + public Type erasure(Types types) { + if (erasure_field == null) { + erasure_field = types.erasure(type); + if (!accessors.isEmpty()) { + for (Pair<Accessors.Kind, MethodSymbol> accessorPair : accessors) { + if (accessorPair.fst == Accessors.Kind.GET) { + ((MethodType)accessorPair.snd.type).restype = erasure_field; + } else { + // set accessors are not yet generated + } + } + } + } + return erasure_field; + } + @DefinedBy(Api.LANGUAGE_MODEL) public ElementKind getKind() { long flags = flags(); if ((flags & PARAMETER) != 0) { if (isExceptionParameter())
< prev index next >