Example usage for org.eclipse.jdt.core.util IModifierConstants ACC_ABSTRACT

List of usage examples for org.eclipse.jdt.core.util IModifierConstants ACC_ABSTRACT

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.util IModifierConstants ACC_ABSTRACT.

Prototype

int ACC_ABSTRACT

To view the source code for org.eclipse.jdt.core.util IModifierConstants ACC_ABSTRACT.

Click Source Link

Usage

From source file:net.rim.ejde.internal.packaging.PackagingManager.java

License:Open Source License

/**
 * Verify if the given <code>classFileReader</code> has code attributes.
 *
 * @param classFileReader/*from w  w  w.  j a  va 2 s.  c o  m*/
 * @return
 */
static private boolean isEvisceratedClass(IClassFileReader classFileReader) {
    // ignore interface classes
    if (!classFileReader.isClass()) {
        return false;
    }
    IMethodInfo[] methodInfos = classFileReader.getMethodInfos();
    if (methodInfos == null) {
        return false;
    }
    for (int i = 0; i < methodInfos.length; i++) {
        // Ignore <init>, <clinit> and abstract methods
        if ("<init>".equalsIgnoreCase(String.valueOf(methodInfos[i].getName())) || methodInfos[i].isClinit()
                || (methodInfos[i].getAccessFlags() & IModifierConstants.ACC_ABSTRACT) != 0) {
            continue;
        }
        if (methodInfos[i].getCodeAttribute() == null) {
            return true;
        }
    }
    return false;
}