private void getSuperclass(TypeDeclaration node) { if(node.getSuperclassType()!=null) { superclass = node.getSuperclassType().resolveBinding().getBinaryName(); } }
private boolean isFinalClassWithoutInheritance(ASTNode node) { if (node instanceof TypeDeclaration) { TypeDeclaration clazz = (TypeDeclaration) node; return isFinalClass(clazz) && clazz.superInterfaceTypes().isEmpty() && (clazz.getSuperclassType() == null || hasType(clazz.getSuperclassType().resolveBinding(), "java.lang.Object")); } return false; }
public boolean visit(TypeDeclaration typeDeclaration) { List<Type> supertypes = new ArrayList<Type>(); Type superclass = typeDeclaration.getSuperclassType(); if (superclass != null) { supertypes.add(superclass); } supertypes.addAll(typeDeclaration.superInterfaceTypes()); SDType sdType = visitTypeDeclaration(typeDeclaration, supertypes); containerStack.push(sdType); sdType.setIsInterface(typeDeclaration.isInterface()); 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 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 String getSuperclass() { if (superclassName == UNITIALIZED_STRING) { superclassName = getFacadeHelper().toString(getASTNode().getSuperclassType()); } return superclassName; }
public String getSuperclass() { if (superclassName == UNITIALIZED_STRING) { superclassName = getFacadeHelper().toString(getASTNode().getSuperclassType()); } return superclassName; }
@Override public boolean visit(TypeDeclaration node) { Type superClasses = node.getSuperclassType(); List<Type> superInterfaces = node.superInterfaceTypes(); processType(superClasses, "Extending class", SourceType.INHERITANCE); if (superInterfaces != null) { for (Type inter : superInterfaces) { processType(inter, "Implementing interface", SourceType.INHERITANCE); } } return true; }
private void setSuperClass() { Type superclass = typeDeclaration.getSuperclassType(); if (superclass != null) { SM_Type inferredType = (new Resolver()).resolveType(superclass, parentPkg.getParentProject()); if(inferredType != null) { superTypes.add(inferredType); inferredType.addThisAsChildToSuperType(this); } } }
public static String getExtendsClass(final Path path) { final CompilationUnit unit = getCompilationUnit(path); final TypeDeclaration classType = (TypeDeclaration) unit.types().get(0); final Type superclassType = classType.getSuperclassType(); if (superclassType == null) { return null; } if (superclassType.isSimpleType()) { return ((SimpleType) superclassType).getName().getFullyQualifiedName(); } // TODO add complex (wildcard etc types) return null; }
@Override public void endVisit(TypeDeclaration node) { if (skipNode(node)) { return; } GenericSequentialFlowInfo info = processSequential(node, node.getSuperclassType()); process(info, node.superInterfaceTypes()); process(info, node.bodyDeclarations()); info.setNoReturn(); }
@Override public void endVisit(TypeDeclaration node) { if (skipNode(node)) return; GenericSequentialFlowInfo info= processSequential(node, node.getSuperclassType()); process(info, node.superInterfaceTypes()); process(info, node.bodyDeclarations()); info.setNoReturn(); }
public void endVisit(TypeDeclaration node) { if (skipNode(node)) return; GenericSequentialFlowInfo info= processSequential(node, node.getSuperclassType()); process(info, node.superInterfaceTypes()); process(info, node.bodyDeclarations()); info.setNoReturn(); }
@Override public void endVisit(TypeDeclaration node) { if (skipNode(node)) return; GenericSequentialFlowInfo info= processSequential(node, node.getSuperclassType()); process(info, node.superInterfaceTypes()); process(info, node.bodyDeclarations()); info.setNoReturn(); }
int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + (this.modifiers == null ? 0 : this.modifiers.listSize()) + (this.typeName == null ? 0 : getName().treeSize()) + (this.typeParameters == null ? 0 : this.typeParameters.listSize()) + (this.optionalSuperclassName == null ? 0 : getSuperclass().treeSize()) + (this.optionalSuperclassType == null ? 0 : getSuperclassType().treeSize()) + (this.superInterfaceNames == null ? 0 : this.superInterfaceNames.listSize()) + (this.superInterfaceTypes == null ? 0 : this.superInterfaceTypes.listSize()) + this.bodyDeclarations.listSize(); } }
int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + (this.modifiers == null ? 0 : this.modifiers.listSize()) + (this.typeName == null ? 0 : getName().treeSize()) + (this.typeParameters == null ? 0 : this.typeParameters.listSize()) + (this.optionalSuperclassName == null ? 0 : getSuperclass().treeSize()) + (this.optionalSuperclassType == null ? 0 : getSuperclassType().treeSize()) + (this.superInterfaceNames == null ? 0 : this.superInterfaceNames.listSize()) + (this.superInterfaceTypes == null ? 0 : this.superInterfaceTypes.listSize()) + this.bodyDeclarations.listSize(); } }
int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + (this.modifiers == null ? 0 : this.modifiers.listSize()) + (this.typeName == null ? 0 : getName().treeSize()) + (this.typeParameters == null ? 0 : this.typeParameters.listSize()) + (this.optionalSuperclassName == null ? 0 : getSuperclass().treeSize()) + (this.optionalSuperclassType == null ? 0 : getSuperclassType().treeSize()) + (this.superInterfaceNames == null ? 0 : this.superInterfaceNames.listSize()) + (this.superInterfaceTypes == null ? 0 : this.superInterfaceTypes.listSize()) + this.bodyDeclarations.listSize(); } }
int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + (this.modifiers == null ? 0 : this.modifiers.listSize()) + (this.typeName == null ? 0 : getName().treeSize()) + (this.typeParameters == null ? 0 : this.typeParameters.listSize()) + (this.optionalSuperclassName == null ? 0 : getSuperclass().treeSize()) + (this.optionalSuperclassType == null ? 0 : getSuperclassType().treeSize()) + (this.superInterfaceNames == null ? 0 : this.superInterfaceNames.listSize()) + (this.superInterfaceTypes == null ? 0 : this.superInterfaceTypes.listSize()) + this.bodyDeclarations.listSize(); } }
@Override int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + (this.modifiers == null ? 0 : this.modifiers.listSize()) + (this.typeName == null ? 0 : getName().treeSize()) + (this.typeParameters == null ? 0 : this.typeParameters.listSize()) + (this.optionalSuperclassName == null ? 0 : getSuperclass().treeSize()) + (this.optionalSuperclassType == null ? 0 : getSuperclassType().treeSize()) + (this.superInterfaceNames == null ? 0 : this.superInterfaceNames.listSize()) + (this.superInterfaceTypes == null ? 0 : this.superInterfaceTypes.listSize()) + this.bodyDeclarations.listSize(); } }
int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + (this.modifiers == null ? 0 : this.modifiers.listSize()) + (this.typeName == null ? 0 : getName().treeSize()) + (this.typeParameters == null ? 0 : this.typeParameters.listSize()) + (this.optionalSuperclassName == null ? 0 : getSuperclass().treeSize()) + (this.optionalSuperclassType == null ? 0 : getSuperclassType().treeSize()) + (this.superInterfaceNames == null ? 0 : this.superInterfaceNames.listSize()) + (this.superInterfaceTypes == null ? 0 : this.superInterfaceTypes.listSize()) + this.bodyDeclarations.listSize(); } }