@Deprecated public SymbolReference<ResolvedTypeDeclaration> solveType(String name, TypeSolver typeSolver) { if (this.wrappedNode.getName().getId().equals(name)) { return SymbolReference.solved(this); } SymbolReference<ResolvedTypeDeclaration> ref = javaParserTypeAdapter.solveType(name, typeSolver); if (ref.isSolved()) { return ref; } String prefix = wrappedNode.getName() + "."; if (name.startsWith(prefix) && name.length() > prefix.length()) { return new JavaParserInterfaceDeclaration(this.wrappedNode, typeSolver).solveType(name.substring(prefix.length()), typeSolver); } return getContext().getParent().solveType(name, typeSolver); }
@Deprecated public SymbolReference<ResolvedTypeDeclaration> solveType(String name, TypeSolver typeSolver) { if (this.wrappedNode.getName().getId().equals(name)) { return SymbolReference.solved(this); } SymbolReference<ResolvedTypeDeclaration> ref = javaParserTypeAdapter.solveType(name, typeSolver); if (ref.isSolved()) { return ref; } String prefix = wrappedNode.getName() + "."; if (name.startsWith(prefix) && name.length() > prefix.length()) { return new JavaParserInterfaceDeclaration(this.wrappedNode, typeSolver).solveType(name.substring(prefix.length()), typeSolver); } return getContext().getParent().solveType(name, typeSolver); }
@Deprecated public SymbolReference<ResolvedTypeDeclaration> solveType(String name, TypeSolver typeSolver) { if (this.wrappedNode.getName().getId().equals(name)) { return SymbolReference.solved(this); } SymbolReference<ResolvedTypeDeclaration> ref = javaParserTypeAdapter.solveType(name, typeSolver); if (ref.isSolved()) { return ref; } String prefix = wrappedNode.getName() + "."; if (name.startsWith(prefix) && name.length() > prefix.length()) { return new JavaParserClassDeclaration(this.wrappedNode, typeSolver).solveType(name.substring(prefix.length()), typeSolver); } return getContext().getParent().solveType(name, typeSolver); }
@Deprecated public SymbolReference<ResolvedTypeDeclaration> solveType(String name, TypeSolver typeSolver) { if (this.wrappedNode.getName().getId().equals(name)) { return SymbolReference.solved(this); } SymbolReference<ResolvedTypeDeclaration> ref = javaParserTypeAdapter.solveType(name, typeSolver); if (ref.isSolved()) { return ref; } String prefix = wrappedNode.getName() + "."; if (name.startsWith(prefix) && name.length() > prefix.length()) { return new JavaParserClassDeclaration(this.wrappedNode, typeSolver).solveType(name.substring(prefix.length()), typeSolver); } return getContext().getParent().solveType(name, typeSolver); }
/** * Resolution should move out of declarations, so that they are pure declarations and the resolution should * work for JavaParser, Reflection and Javassist classes in the same way and not be specific to the three * implementations. */ @Deprecated public SymbolReference<ResolvedTypeDeclaration> solveType(String name) { if (this.wrappedNode.getName().getId().equals(name)) { return SymbolReference.solved(this); } SymbolReference<ResolvedTypeDeclaration> ref = javaParserTypeAdapter.solveType(name); if (ref.isSolved()) { return ref; } String prefix = wrappedNode.getName() + "."; if (name.startsWith(prefix) && name.length() > prefix.length()) { return new JavaParserClassDeclaration(this.wrappedNode, typeSolver).solveType(name.substring(prefix.length())); } return getContext().getParent().solveType(name); }
/** * This method is deprecated because it receives the TypesSolver as a parameter. * Eventually we would like to remove all usages of TypeSolver as a parameter. * * Also, resolution should move out of declarations, so that they are pure declarations and the resolution should * work for JavaParser, Reflection and Javassist classes in the same way and not be specific to the three * implementations. */ @Deprecated public SymbolReference<ResolvedTypeDeclaration> solveType(String name) { if (this.wrappedNode.getName().getId().equals(name)) { return SymbolReference.solved(this); } SymbolReference<ResolvedTypeDeclaration> ref = javaParserTypeAdapter.solveType(name); if (ref.isSolved()) { return ref; } String prefix = wrappedNode.getName() + "."; if (name.startsWith(prefix) && name.length() > prefix.length()) { return new JavaParserInterfaceDeclaration(this.wrappedNode, typeSolver).solveType(name.substring(prefix.length())); } return getContext().getParent().solveType(name); }