Class ExpressionContext<N extends Expression>

java.lang.Object
com.github.javaparser.symbolsolver.javaparsermodel.contexts.AbstractJavaParserContext<N>
com.github.javaparser.symbolsolver.javaparsermodel.contexts.ExpressionContext<N>
All Implemented Interfaces:
Context
Direct Known Subclasses:
ArrayAccessExprContext, BinaryExprContext, ConditionalExprContext, EnclosedExprContext, FieldAccessContext, InstanceOfExprContext, LambdaExprContext, MethodCallExprContext, MethodReferenceExprContext, ObjectCreationContext, UnaryExprContext, VariableDeclarationExprContext

public class ExpressionContext<N extends Expression> extends AbstractJavaParserContext<N>
  • Constructor Details

    • ExpressionContext

      public ExpressionContext(N wrappedNode, TypeSolver typeSolver)
  • Method Details

    • solveSymbolAsValue

      public Optional<Value> solveSymbolAsValue(String name)
      Description copied from interface: Context
      Used where a symbol is being used (e.g. solving x when used as an argument doubleThis(x), or calculation return x * 2;).
      Parameters:
      name - the variable / reference / identifier used.
      Returns:
      // FIXME: Better documentation on how this is different to solveSymbol()
    • solveSymbol

      public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name)
      Description copied from interface: Context
      Used where a symbol is being used (e.g. solving x when used as an argument doubleThis(x), or calculation return x * 2;).
      Parameters:
      name - the variable / reference / identifier used.
      Returns:
      // FIXME: Better documentation on how this is different to solveSymbolAsValue()