Example usage for org.eclipse.jdt.core.dom Modifier isAnnotation

List of usage examples for org.eclipse.jdt.core.dom Modifier isAnnotation

Introduction

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

Prototype

@Override
public boolean isAnnotation() 

Source Link

Usage

From source file:info.okoshi.context.ModifiersInfo.java

License:Open Source License

/**
 * Create {@link ModifiersInfo} instance.<br>
 *
 * @param modifiers// w  w w  . j a  v  a 2 s  .  c o  m
 */
public ModifiersInfo(final List<?> modifiers) {
    for (final Object modifierObject : modifiers) {
        IExtendedModifier extendedModifier = (IExtendedModifier) modifierObject;
        if (extendedModifier.isModifier()) {
            final Modifier modifier = (Modifier) modifierObject;

            abstractValue = modifier.isAbstract();
            annotationValue = modifier.isAnnotation();
            finalValue = modifier.isFinal();
            nativeValue = modifier.isNative();
            privateValue = modifier.isPrivate();
            protectedValue = modifier.isProtected();
            publicValue = modifier.isPublic();
            staticValue = modifier.isStatic();
            synchronizedValue = modifier.isSynchronized();
            volatileValue = modifier.isVolatile();
        }
    }

    if (!(publicValue || protectedValue || privateValue)) {
        privateValue = true;
        packagePrivateValue = true;
    }
}