/** * Returns whether this type declaration is a local type. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration statement node. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration statement node, and <code>false</code> otherwise * @since 2.0 (originally declared on <code>TypeDeclaration</code>) */ public boolean isLocalTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof TypeDeclarationStatement); }
/** * Returns whether this type declaration is a local type. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration statement node. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration statement node, and <code>false</code> otherwise * @since 2.0 (originally declared on <code>TypeDeclaration</code>) */ public boolean isLocalTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof TypeDeclarationStatement); }
/** * Returns whether this type declaration is a local type. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration statement node. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration statement node, and <code>false</code> otherwise * @since 2.0 (originally declared on <code>TypeDeclaration</code>) */ public boolean isLocalTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof TypeDeclarationStatement); }
/** * Returns whether this type declaration is a local type. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration statement node. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration statement node, and <code>false</code> otherwise * @since 2.0 (originally declared on <code>TypeDeclaration</code>) */ public boolean isLocalTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof TypeDeclarationStatement); }
/** * Returns whether this type declaration is a package member (that is, * a top-level type). * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a compilation unit node. * </p> * * @return <code>true</code> if this type declaration is a child of * a compilation unit node, and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isPackageMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof CompilationUnit); }
/** * Returns whether this type declaration is a package member (that is, * a top-level type). * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a compilation unit node. * </p> * * @return <code>true</code> if this type declaration is a child of * a compilation unit node, and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isPackageMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof CompilationUnit); }
/** * Returns whether this type declaration is a package member (that is, * a top-level type). * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a compilation unit node. * </p> * * @return <code>true</code> if this type declaration is a child of * a compilation unit node, and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isPackageMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof CompilationUnit); }
/** * Returns whether this type declaration is a local type. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration statement node. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration statement node, and <code>false</code> otherwise * @since 2.0 (originally declared on <code>TypeDeclaration</code>) */ public boolean isLocalTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof TypeDeclarationStatement); }
/** * Returns whether this type declaration is a package member (that is, * a top-level type). * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a compilation unit node. * </p> * * @return <code>true</code> if this type declaration is a child of * a compilation unit node, and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isPackageMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof CompilationUnit); }
/** * Returns whether this type declaration is a local type. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration statement node. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration statement node, and <code>false</code> otherwise * @since 2.0 (originally declared on <code>TypeDeclaration</code>) */ public boolean isLocalTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof TypeDeclarationStatement); }
/** * Returns whether this type declaration is a package member (that is, * a top-level type). * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a compilation unit node. * </p> * * @return <code>true</code> if this type declaration is a child of * a compilation unit node, and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isPackageMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof CompilationUnit); }
/** * Returns whether this type declaration is a type member. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration node or an anonymous * class declaration. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration node or an anonymous class declaration node, * and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof AbstractTypeDeclaration) || (parent instanceof AnonymousClassDeclaration); }
/** * Returns whether this type declaration is a type member. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration node or an anonymous * class declaration. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration node or an anonymous class declaration node, * and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof AbstractTypeDeclaration) || (parent instanceof AnonymousClassDeclaration); }
/** * Returns whether this type declaration is a package member (that is, * a top-level type). * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a compilation unit node. * </p> * * @return <code>true</code> if this type declaration is a child of * a compilation unit node, and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isPackageMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof CompilationUnit); }
/** * Returns whether this type declaration is a type member. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration node or an anonymous * class declaration. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration node or an anonymous class declaration node, * and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof AbstractTypeDeclaration) || (parent instanceof AnonymousClassDeclaration); }
/** * Returns whether this type declaration is a type member. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration node or an anonymous * class declaration. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration node or an anonymous class declaration node, * and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof AbstractTypeDeclaration) || (parent instanceof AnonymousClassDeclaration); }
/** * Returns whether this type declaration is a type member. * <p> * Note that this is a convenience method that simply checks whether * this node's parent is a type declaration node or an anonymous * class declaration. * </p> * * @return <code>true</code> if this type declaration is a child of * a type declaration node or an anonymous class declaration node, * and <code>false</code> otherwise * @since 2.0 (originally declared on {@link TypeDeclaration}) */ public boolean isMemberTypeDeclaration() { ASTNode parent = getParent(); return (parent instanceof AbstractTypeDeclaration) || (parent instanceof AnonymousClassDeclaration); }
@Override public boolean visit(AbstractTypeDeclaration node) { Assert.isTrue(node.getParent() instanceof TypeDeclarationStatement); result.add(node.getName().getIdentifier()); return false; }
@Override public boolean visit(AbstractTypeDeclaration node) { Assert.isTrue(node.getParent() instanceof TypeDeclarationStatement); result.add(node.getName().getIdentifier()); return false; }
public static String qname(AbstractTypeDeclaration type) { String packageName = ((CompilationUnit) type.getParent()).getPackage().getName().getFullyQualifiedName(); String typeName = type.getName().getIdentifier(); return packageName + "." + typeName; }