Example usage for org.eclipse.jdt.core.dom IPackageBinding getModifiers

List of usage examples for org.eclipse.jdt.core.dom IPackageBinding getModifiers

Introduction

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

Prototype

public int getModifiers();

Source Link

Document

Returns the modifiers for this binding.

Usage

From source file:ca.mcgill.cs.swevo.jayfx.ASTCrawler.java

License:Open Source License

@Override
public boolean visit(final PackageDeclaration pNode) {
    final IPackageBinding binding = pNode.resolveBinding();
    if (ASTCrawler.checkForNull(binding))
        return false;
    final IElement packageElem = this.convertBinding(binding);

    this.aDB.addElement(packageElem, binding.getModifiers());

    final CompilationUnit parent = (CompilationUnit) pNode.getParent();
    @SuppressWarnings("rawtypes")
    final List containedTypes = parent.types();
    for (@SuppressWarnings("rawtypes")
    final Iterator it = containedTypes.iterator(); it.hasNext();) {
        final AbstractTypeDeclaration type = (AbstractTypeDeclaration) it.next();
        final ITypeBinding typeBinding = type.resolveBinding();
        final IElement typeElem = ASTCrawler.convertBinding(typeBinding);
        this.aDB.addElement(typeElem, typeBinding.getModifiers());
        this.aDB.addRelation(packageElem, Relation.CONTAINS, typeElem);
    }//from w ww  .j  a v a2  s .c  om

    return true;
}