Class ClassOrInterfaceDeclarationExtendsContext

java.lang.Object
com.github.javaparser.symbolsolver.javaparsermodel.contexts.AbstractJavaParserContext<ClassOrInterfaceDeclaration>
com.github.javaparser.symbolsolver.javaparsermodel.contexts.ClassOrInterfaceDeclarationExtendsContext
All Implemented Interfaces:
Context

public class ClassOrInterfaceDeclarationExtendsContext extends AbstractJavaParserContext<ClassOrInterfaceDeclaration>
Limited version of ClassOrInterfaceDeclarationContext that only resolves type parameters for use by extends and implements part of declaration.
  • Constructor Details

  • Method Details

    • solveType

      public SymbolReference<ResolvedTypeDeclaration> solveType(String name, List<ResolvedType> typeArguments)
      Description copied from interface: Context
      Method used to solve a name with an expected list of type arguments.
      This method differs from Context.solveType(String) by taking the type arguments in consideration. For example, lets imagine that we have a project containing the following classes:
      • com/example/Alpha.java
      • com/example/Beta.java
      Where Alpha creates a inner interface called CustomInterface and Beta implements Alpha.CustomInterface and also declares a inner interface called CustomInterface with type arguments. Using this method we can specify which type arguments we are expecting and will be resolved with the type matching that declaration.
      Parameters:
      name - The name to be solved.
      typeArguments - The list of expected type arguments.
      Returns:
      The declaration associated with the given type name.