Class DetachedVarSymbol

All Implemented Interfaces:, AnnotatedConstruct, Element, VariableElement

public class DetachedVarSymbol extends
A DetachedVarSymbol represents a variable that is not part of any AST Tree. DetachedVarSymbols are created when desugaring source code constructs and they carry important type information, but some methods such as TreeInfo.declarationFor do not work on them.
  • Nested Class Summary

    Nested classes/interfaces inherited from class,,,,<T extends>,,,,,,,,,,,,,,,,<R extends Object,P extends Object>

    Nested classes/interfaces inherited from interface,,
  • Field Summary

    Modifier and Type

    Fields inherited from class

    adr, pos

    Fields inherited from class

    completer, erasure_field, flags_field, kind, metadata, name, owner, type
  • Constructor Summary

    DetachedVarSymbol(long flags, name, type, owner)
    Construct a detached variable symbol, given its flags, name, type and owner.
  • Method Summary

    Modifier and Type
    Get the declaration tree for the variable.
    Set the declaration tree for the variable.

    Methods inherited from class

    accept, accept, asMemberOf, asMethodHandle, clone, getConstantValue, getConstValue, getKind, isExceptionParameter, isResourceVariable, poolTag, setData, setLazyConstValue, toString

    Methods inherited from class

    annotationsPendingCompletion, apiComplete, appendAttributes, appendClassInitTypeAttributes, appendInitTypeAttributes, appendUniqueTypeAttributes, asType, attribute, baseSymbol, complete, enclClass, erasure, exists, externalType, flags, flatName, getAnnotationMirrors, getClassInitTypeAttributes, getDeclarationAttributes, getEnclosedElements, getEnclosingElement, getInitTypeAttributes, getMetadata, getModifiers, getQualifiedName, getRawAttributes, getRawTypeAttributes, getSimpleName, getTypeParameters, hasAnnotations, hasDeprecatedAnnotation, hasOuterInstance, hasTypeAnnotations, isAbstract, isAccessibleIn, isAnonymous, isCompleted, isConstructor, isDeprecatableViaAnnotation, isDeprecated, isDeprecatedForRemoval, isDirectlyOrIndirectlyLocal, isDynamic, isEnclosedBy, isEnum, isFinal, isInheritedIn, isInner, isInterface, isMemberOf, isNonSealed, isPreviewApi, isPrivate, isPublic, isSealed, isStatic, isSubClass, location, location, members, outermostClass, overrides, packge, prependAttributes, resetAnnotations, setAttributes, setClassInitTypeAttributes, setDeclarationAttributes, setInitTypeAttributes, setTypeAttributes

    Methods inherited from class

    getAnnotation, getAnnotationsByType, getAttribute, getInheritedAnnotations

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javax.lang.model.element.Element

    equals, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getEnclosedElements, getModifiers, hashCode

    Methods inherited from interface


    Methods inherited from interface javax.lang.model.element.VariableElement

    asType, getEnclosingElement, getSimpleName
  • Field Details

  • Constructor Details

    • DetachedVarSymbol

      public DetachedVarSymbol(long flags, name, type, owner)
      Construct a detached variable symbol, given its flags, name, type and owner.
  • Method Details

    • setDeclaration

      public void setDeclaration(VariableTree decl)
      Set the declaration tree for the variable.
    • getDeclaration

      public @Nullable VariableTree getDeclaration()
      Get the declaration tree for the variable.