< prev index next >

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

Print this page

        

*** 368,377 **** --- 368,381 ---- 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() {
*** 400,417 **** --- 404,433 ---- 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() { return (flags() & ENUM) != 0; } + public boolean isSealed() { + return (flags_field & SEALED) != 0; + } + + public boolean isFinal() { + return (flags_field & FINAL) != 0; + } + /** Is this symbol declared (directly or indirectly) local * to a method or variable initializer? * Also includes fields of inner classes which are in * turn local to a method or variable initializer. */
*** 1427,1436 **** --- 1443,1454 ---- return ElementKind.ANNOTATION_TYPE; else if ((flags & INTERFACE) != 0) return ElementKind.INTERFACE; else if ((flags & ENUM) != 0) return ElementKind.ENUM; + else if ((flags & RECORD) != 0) + return ElementKind.RECORD; else return ElementKind.CLASS; } @Override @DefinedBy(Api.LANGUAGE_MODEL)
*** 1438,1447 **** --- 1456,1472 ---- apiComplete(); long flags = flags(); return Flags.asModifierSet(flags & ~DEFAULT); } + @Override @DefinedBy(Api.LANGUAGE_MODEL) + public java.util.List<VariableElement> getStateComponents() { + apiComplete(); + // Inital implementation + return javax.lang.model.util.ElementFilter.stateComponentsIn(getEnclosedElements()); + } + @DefinedBy(Api.LANGUAGE_MODEL) public NestingKind getNestingKind() { apiComplete(); if (owner.kind == PCK) return NestingKind.TOP_LEVEL;
*** 1528,1537 **** --- 1553,1567 ---- public void setAnnotationTypeMetadata(AnnotationTypeMetadata a) { Assert.checkNonNull(a); Assert.check(!annotationTypeMetadata.isMetadataForAnnotationType()); this.annotationTypeMetadata = a; } + + @DefinedBy(Api.LANGUAGE_MODEL) + public List<Type> getPermittedSubtypes() { + return ((ClassType)type).permitted; + } } /** A class for variable symbols */
*** 1550,1559 **** --- 1580,1591 ---- * 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); }
*** 1594,1603 **** --- 1626,1643 ---- 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); + } + return erasure_field; + } + @DefinedBy(Api.LANGUAGE_MODEL) public ElementKind getKind() { long flags = flags(); if ((flags & PARAMETER) != 0) { if (isExceptionParameter())
*** 1778,1787 **** --- 1818,1831 ---- public int poolTag() { return owner.isInterface() ? ClassFile.CONSTANT_InterfaceMethodref : ClassFile.CONSTANT_Methodref; } + public boolean isDynamic() { + return false; + } + public boolean isHandle() { return false; }
*** 2158,2167 **** --- 2202,2212 ---- /** A class for method handles. */ public static class MethodHandleSymbol extends MethodSymbol implements LoadableConstant { private Symbol refSym; + // in case the simbol is a variable private boolean getter; public MethodHandleSymbol(Symbol msym) { this(msym, false); }
< prev index next >