Example usage for org.eclipse.jdt.core.dom FieldDeclaration getStructuralProperty

List of usage examples for org.eclipse.jdt.core.dom FieldDeclaration getStructuralProperty

Introduction

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

Prototype

public final Object getStructuralProperty(StructuralPropertyDescriptor property) 

Source Link

Document

Returns the value of the given structural property for this node.

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.FieldDeclaration)
 *///from   w  ww . j  av  a 2s  .c  om
@Override
public boolean visit(FieldDeclaration node) {
    visitExtendedModifiers((List<?>) node.getStructuralProperty(FieldDeclaration.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}/*w  w  w .  j av  a  2s.  c  o  m*/
 * 
 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom. MethodDeclaration)
 */
@Override
public final boolean visit(final FieldDeclaration node) {
    if (memberType == IJavaElement.FIELD) {
        VariableDeclarationFragment fragment = (VariableDeclarationFragment) (node.fragments().get(0));
        if (fragment.getName().toString().equals(memberName) && matchesLocation(node)) {
            visitExtendedModifiers((List<?>) node.getStructuralProperty(FieldDeclaration.MODIFIERS2_PROPERTY));
            return false;
        }
    }
    return true;
}