Class SymbolReference<S extends com.github.javaparser.resolution.declarations.ResolvedDeclaration>


  • public class SymbolReference<S extends com.github.javaparser.resolution.declarations.ResolvedDeclaration>
    extends Object
    A reference to a symbol. It can solved or not solved. If solved the corresponding declaration will be provided.
    Author:
    Federico Tomassetti
    • Method Detail

      • solved

        public static <S extends com.github.javaparser.resolution.declarations.ResolvedDeclaration,​S2 extends S> SymbolReference<S> solved​(S2 symbolDeclaration)
        Create a solve reference to the given symbol.
      • unsolved

        public static <S extends com.github.javaparser.resolution.declarations.ResolvedDeclaration,​S2 extends S> SymbolReference<S> unsolved​(Class<S2> clazz)
        Create an unsolved reference specifying the type of the value expected.
      • getCorrespondingDeclaration

        public S getCorrespondingDeclaration()
        The corresponding declaration. If not solve this throws UnsupportedOperationException.
      • isSolved

        public boolean isSolved()
        Is the reference solved?
      • adapt

        public static <O extends com.github.javaparser.resolution.declarations.ResolvedDeclaration> SymbolReference<O> adapt​(SymbolReference<? extends O> ref,
                                                                                                                             Class<O> clazz)