Example usage for org.eclipse.jdt.core.dom AnnotationTypeDeclaration MODIFIERS2_PROPERTY

List of usage examples for org.eclipse.jdt.core.dom AnnotationTypeDeclaration MODIFIERS2_PROPERTY

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom AnnotationTypeDeclaration MODIFIERS2_PROPERTY.

Prototype

ChildListPropertyDescriptor MODIFIERS2_PROPERTY

To view the source code for org.eclipse.jdt.core.dom AnnotationTypeDeclaration MODIFIERS2_PROPERTY.

Click Source Link

Document

The "modifiers" structural property of this node type (element type: IExtendedModifier ).

Usage

From source file:org.jboss.tools.ws.jaxrs.core.jdt.JavaAnnotationLocator.java

License:Open Source License

/**
 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.AnnotationTypeDeclaration)
 *///from   ww  w . j ava  2 s  .  c o m
@Override
public boolean visit(AnnotationTypeDeclaration node) {
    visitExtendedModifiers((List<?>) node.getStructuralProperty(AnnotationTypeDeclaration.MODIFIERS2_PROPERTY));
    // no need to visit furthermore
    return false;
}

From source file:org.jboss.tools.ws.jaxrs.core.jdt.JavaAnnotationsVisitor.java

License:Open Source License

/**
 * {@inheritDoc}//ww w  .  ja v  a 2  s  .co  m
 * 
 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.AnnotationTypeDeclaration)
 */
@Override
public final boolean visit(final AnnotationTypeDeclaration node) {
    if (memberType == IJavaElement.TYPE && node.getName().getFullyQualifiedName().equals(memberName)
            && matchesLocation(node)) {
        visitExtendedModifiers(
                (List<?>) node.getStructuralProperty(AnnotationTypeDeclaration.MODIFIERS2_PROPERTY));
        return false;
    }
    return true;
}

From source file:org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils.java

License:Open Source License

private static List<?> getNodeModifiers(final ASTNode node) {
    if (node == null) {
        return null;
    }/*from ww  w  .  j ava 2s  .c  o  m*/
    switch (node.getNodeType()) {
    case ASTNode.TYPE_DECLARATION:
        return (List<?>) node.getStructuralProperty(TypeDeclaration.MODIFIERS2_PROPERTY);
    case ASTNode.ANNOTATION_TYPE_DECLARATION:
        return (List<?>) node.getStructuralProperty(AnnotationTypeDeclaration.MODIFIERS2_PROPERTY);
    case ASTNode.METHOD_DECLARATION:
        return (List<?>) node.getStructuralProperty(MethodDeclaration.MODIFIERS2_PROPERTY);
    case ASTNode.FIELD_DECLARATION:
        return (List<?>) node.getStructuralProperty(FieldDeclaration.MODIFIERS2_PROPERTY);
    default:
        return null;
    }
}