List of usage examples for org.eclipse.jdt.internal.compiler.lookup TagBits AnnotationRuntimeRetention
long AnnotationRuntimeRetention
To view the source code for org.eclipse.jdt.internal.compiler.lookup TagBits AnnotationRuntimeRetention.
Click Source Link
From source file:com.codenvy.ide.ext.java.server.internal.core.ClassFileInfo.java
License:Open Source License
private IMemberValuePair[] getRetentionPolicy(long tagBits) { if ((tagBits & TagBits.AnnotationRetentionMASK) == 0) return Annotation.NO_MEMBER_VALUE_PAIRS; String retention = null;/*from w w w . j a va 2 s . co m*/ if ((tagBits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { // TagBits.AnnotationRuntimeRetention combines both TagBits.AnnotationClassRetention & TagBits.AnnotationSourceRetention retention = new String( CharOperation.concatWith(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, '.')) + '.' + new String(TypeConstants.UPPER_RUNTIME); } else if ((tagBits & TagBits.AnnotationSourceRetention) != 0) { retention = new String( CharOperation.concatWith(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, '.')) + '.' + new String(TypeConstants.UPPER_SOURCE); } else { retention = new String( CharOperation.concatWith(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, '.')) + '.' + new String(TypeConstants.UPPER_CLASS); } final String value = retention; return new IMemberValuePair[] { new IMemberValuePair() { public int getValueKind() { return IMemberValuePair.K_QUALIFIED_NAME; } public Object getValue() { return value; } public String getMemberName() { return new String(TypeConstants.VALUE); } } }; }
From source file:com.codenvy.ide.ext.java.server.internal.core.search.indexing.BinaryIndexer.java
License:Open Source License
private void addBinaryRetentionAnnotation(long bits) { char[][] compoundName = TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY; addTypeReference(compoundName[compoundName.length - 1]); if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { addFieldReference(TypeConstants.UPPER_RUNTIME); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { addFieldReference(TypeConstants.UPPER_CLASS); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { addFieldReference(TypeConstants.UPPER_SOURCE); }/*from w w w. j a v a2 s . c o m*/ }
From source file:org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.java
License:Open Source License
@Override public boolean hasRuntimeRetention() { return (annotationBinding.getAnnotationType().tagBits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention; }