Class SymbolReference<S extends ResolvedDeclaration>
java.lang.Object
com.github.javaparser.symbolsolver.model.resolution.SymbolReference<S>
A reference to a symbol. It can solved or not solved. If solved the corresponding
declaration will be provided.
- Author:
- Federico Tomassetti
-
Method Summary
Modifier and TypeMethodDescriptionstatic <O extends ResolvedDeclaration>
SymbolReference<O>adapt(SymbolReference<? extends O> ref, Class<O> clazz)
The corresponding declaration.boolean
isSolved()
Is the reference solved?static <S extends ResolvedDeclaration, S2 extends S>
SymbolReference<S>solved(S2 symbolDeclaration)
Create a solve reference to the given symbol.toString()
static <S extends ResolvedDeclaration, S2 extends S>
SymbolReference<S>Create an unsolved reference specifying the type of the value expected.
-
Method Details
-
solved
public static <S extends ResolvedDeclaration, S2 extends S> SymbolReference<S> solved(S2 symbolDeclaration)Create a solve reference to the given symbol. -
unsolved
public static <S extends ResolvedDeclaration, S2 extends S> SymbolReference<S> unsolved(Class<S2> clazz)Create an unsolved reference specifying the type of the value expected. -
toString
-
getCorrespondingDeclaration
The corresponding declaration. If not solve this throws UnsupportedOperationException. // TODO: Convert this to returning Optional. -
isSolved
public boolean isSolved()Is the reference solved? -
adapt
public static <O extends ResolvedDeclaration> SymbolReference<O> adapt(SymbolReference<? extends O> ref, Class<O> clazz)
-