Example usage for org.eclipse.jdt.internal.compiler.env IBinaryField getTagBits

List of usage examples for org.eclipse.jdt.internal.compiler.env IBinaryField getTagBits

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.env IBinaryField getTagBits.

Prototype

long getTagBits();

Source Link

Document

Answer the tagbits set according to the bits for annotations.

Usage

From source file:com.codenvy.ide.ext.java.server.internal.core.BinaryField.java

License:Open Source License

public IAnnotation[] getAnnotations() throws JavaModelException {
    IBinaryField info = (IBinaryField) getElementInfo();
    IBinaryAnnotation[] binaryAnnotations = info.getAnnotations();
    return getAnnotations(binaryAnnotations, info.getTagBits());
}

From source file:com.codenvy.ide.ext.java.server.internal.core.ClassFileInfo.java

License:Open Source License

/**
 * Creates the handles and infos for the fields of the given binary type.
 * Adds new handles to the given vector.
 *///from   w  ww  .j av  a2s. co m
private void generateFieldInfos(IType type, IBinaryType typeInfo, HashMap newElements,
        ArrayList childrenHandles) {
    // Make the fields
    IBinaryField[] fields = typeInfo.getFields();
    if (fields == null) {
        return;
    }
    JavaModelManager manager = ((JavaElement) type).manager;
    for (int i = 0, fieldCount = fields.length; i < fieldCount; i++) {
        IBinaryField fieldInfo = fields[i];
        BinaryField field = new BinaryField((JavaElement) type, manager,
                manager.intern(new String(fieldInfo.getName())));
        newElements.put(field, fieldInfo);
        childrenHandles.add(field);
        generateAnnotationsInfos(field, fieldInfo.getAnnotations(), fieldInfo.getTagBits(), newElements);
    }
}

From source file:org.eclipse.che.jdt.BinaryTypeConvector.java

License:Open Source License

private static JsonElement toJsonField(IBinaryField field) {
    JsonObject object = new JsonObject();
    object.addProperty("modifiers", field.getModifiers());
    object.add("constant", toJsonConstant(field.getConstant()));
    object.add("genericSignature", field.getGenericSignature() == null ? JsonNull.INSTANCE
            : new JsonPrimitive(new String(field.getGenericSignature())));
    object.add("name",
            field.getName() == null ? JsonNull.INSTANCE : new JsonPrimitive(new String(field.getName())));
    object.addProperty("tagBits", String.valueOf(field.getTagBits()));
    object.add("typeName", field.getTypeName() == null ? JsonNull.INSTANCE
            : new JsonPrimitive(new String(field.getTypeName())));
    object.add("annotations", toJsonAnnotations(field.getAnnotations()));
    return object;
}