.append(declaration.getReturnType2().toString()) .append(" ").append(declaration.getName().getFullyQualifiedName()) .append("(");
@Override public String toString() { return type.toString(); }
@Override public String toString() { return type.toString(); }
@Override public boolean isQualified() { return type.toString().contains("."); }
private String getType(Type type) { String name= type.toString(); int pos= name.lastIndexOf('.'); if (pos >= 0) name= name.substring(pos + 1); return name; } }
@Override public String getQualifiedName() { String result = type.toString(); if (origin instanceof Importer<?>) { return ((Importer<?>) origin).resolveType(result); } return result; }
@Override public String getQualifiedName() { String result = type.toString(); if (origin instanceof Importer<?>) { return ((Importer<?>) origin).resolveType(result); } return result; }
@Override public boolean visit(CastExpression node) { final String type = node.getType().toString(); if (topMethod != null && methodsAsRoot) { types.put(topMethod, type); } else if (topClass != null) { types.put(topClass, type); } return super.visit(node); }
@Override public boolean visit(ClassInstanceCreation node) { final String type = node.getType().toString(); if (topMethod != null && methodsAsRoot) { types.put(topMethod, type); } else if (topClass != null) { types.put(topClass, type); } return super.visit(node); }
@Override public boolean visit(final SingleVariableDeclaration node) { if (className.contains(node.getType().toString())) { interestingNodes.add(node.getParent()); } return false; }
@Override public boolean visit(VariableDeclarationStatement node) { final String type = node.getType().toString(); if (topMethod != null && methodsAsRoot) { types.put(topMethod, type); } else if (topClass != null) { types.put(topClass, type); } return super.visit(node); }
@Override public String getQualifiedNameWithGenerics() { String result = type.toString(); if (origin instanceof Importer<?>) { return Types.rebuildGenericNameWithArrays(((Importer<?>) origin).resolveType(result), this); } return result; }
public boolean visit(VariableDeclarationStatement node) { String simpleType = node.getType().toString(); for(Object o : node.fragments()) { VariableDeclarationFragment fragment = (VariableDeclarationFragment) o; String variableName = fragment.getName().toString(); String fullType = importList.containsKey(simpleType) ? importList.get(simpleType) : simpleType; localVariables.put(variableName, fullType); } return true; }
public static String getSupertype(final Path path) { final CompilationUnit unit = getCompilationUnit(path); unit.recordModifications(); final TypeDeclaration classType = (TypeDeclaration) unit.types().get(0); return classType.getSuperclassType().toString(); }
public TypeVariable(Type type){ super(type.resolveBinding()); fSource= type.toString(); ICompilationUnit cu= ASTCreator.getCu(type); Assert.isNotNull(cu); fTypeRange= new CompilationUnitRange(cu, ASTNodes.getElementType(type)); }
public static String getSupertype(final Path path) { final CompilationUnit unit = getCompilationUnit(path); unit.recordModifications(); final TypeDeclaration classType = (TypeDeclaration) unit.types().get(0); return classType.getSuperclassType().toString(); }
public TypeVariable(Type type){ super(type.resolveBinding()); fSource= type.toString(); ICompilationUnit cu= ASTCreator.getCu(type); Assert.isNotNull(cu); fTypeRange= new CompilationUnitRange(cu, ASTNodes.getElementType(type)); }
public TypeVariable(Type type){ super(type.resolveBinding()); fSource= type.toString(); ICompilationUnit cu= ASTCreator.getCu(type); Assert.isNotNull(cu); fTypeRange= new CompilationUnitRange(cu, ASTNodes.getElementType(type)); }
@Override public boolean visit(final VariableDeclarationStatement node) { final ASTNode parent = node.getParent(); for (final Object fragment : node.fragments()) { final VariableDeclarationFragment frag = (VariableDeclarationFragment) fragment; variableScopes.put(parent, new Variable(frag.getName() .getIdentifier(), node.getType().toString(), ScopeType.SCOPE_LOCAL)); } return false; }
@Override public boolean visit(ClassInstanceCreation node) { String nodeType = node.getType().toString(); nodeType = resolveClassname(nodeType); List<String> resolvedParams = this.methodParameterGuesser(node.arguments()); ConstructorType resolvedConstructor = new ConstructorType(nodeType, resolvedParams); processConstructor(resolvedConstructor, cu.getLineNumber(node.getType().getStartPosition()), cu.getColumnNumber(node.getType().getStartPosition()), node.getType().getLength()); return super.visit(node); }