static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) { IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs(); int length = binaryPairs == null ? 0 : binaryPairs.length; ElementValuePair[] pairs = length == 0 ? Binding.NO_ELEMENT_VALUE_PAIRS : new ElementValuePair[length]; for (int i = 0; i < length; i++) pairs[i] = new ElementValuePair(binaryPairs[i].getName(), convertMemberValue(binaryPairs[i].getValue(), env, missingTypeNames, false), null); char[] typeName = annotationInfo.getTypeName(); ReferenceBinding annotationType = env.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames); return env.createUnresolvedAnnotation(annotationType, pairs); }
static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) { IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs(); int length = binaryPairs == null ? 0 : binaryPairs.length; ElementValuePair[] pairs = length == 0 ? Binding.NO_ELEMENT_VALUE_PAIRS : new ElementValuePair[length]; for (int i = 0; i < length; i++) pairs[i] = new ElementValuePair(binaryPairs[i].getName(), convertMemberValue(binaryPairs[i].getValue(), env, missingTypeNames, false), null); char[] typeName = annotationInfo.getTypeName(); ReferenceBinding annotationType = env.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames); return env.createUnresolvedAnnotation(annotationType, pairs); }
static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) { IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs(); int length = binaryPairs == null ? 0 : binaryPairs.length; ElementValuePair[] pairs = length == 0 ? Binding.NO_ELEMENT_VALUE_PAIRS : new ElementValuePair[length]; for (int i = 0; i < length; i++) pairs[i] = new ElementValuePair(binaryPairs[i].getName(), convertMemberValue(binaryPairs[i].getValue(), env, missingTypeNames, false), null); char[] typeName = annotationInfo.getTypeName(); ReferenceBinding annotationType = env.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames); return env.createUnresolvedAnnotation(annotationType, pairs); }
private static AnnotationBinding buildRetentionAnnotation(long bits, LookupEnvironment env) { ReferenceBinding retentionPolicy = env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, null); Object value = null; if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { value = retentionPolicy.getField(TypeConstants.UPPER_RUNTIME, true); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_CLASS, true); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_SOURCE, true); } return env.createAnnotation( env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTION, null), new ElementValuePair[] { new ElementValuePair(TypeConstants.VALUE, value, null) }); }
private static AnnotationBinding buildRetentionAnnotation(long bits, LookupEnvironment env) { ReferenceBinding retentionPolicy = env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, null); Object value = null; if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { value = retentionPolicy.getField(TypeConstants.UPPER_RUNTIME, true); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_CLASS, true); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_SOURCE, true); } return env.createAnnotation( env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTION, null), new ElementValuePair[] { new ElementValuePair(TypeConstants.VALUE, value, null) }); }
static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) { IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs(); int length = binaryPairs == null ? 0 : binaryPairs.length; ElementValuePair[] pairs = length == 0 ? Binding.NO_ELEMENT_VALUE_PAIRS : new ElementValuePair[length]; for (int i = 0; i < length; i++) pairs[i] = new ElementValuePair(binaryPairs[i].getName(), convertMemberValue(binaryPairs[i].getValue(), env, missingTypeNames, false), null); char[] typeName = annotationInfo.getTypeName(); ReferenceBinding annotationType = env.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames); return env.createUnresolvedAnnotation(annotationType, pairs); }
static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) { IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs(); int length = binaryPairs == null ? 0 : binaryPairs.length; ElementValuePair[] pairs = length == 0 ? Binding.NO_ELEMENT_VALUE_PAIRS : new ElementValuePair[length]; for (int i = 0; i < length; i++) pairs[i] = new ElementValuePair(binaryPairs[i].getName(), convertMemberValue(binaryPairs[i].getValue(), env, missingTypeNames), null); char[] typeName = annotationInfo.getTypeName(); ReferenceBinding annotationType = env.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames); return new UnresolvedAnnotationBinding(annotationType, pairs, env); }
private static AnnotationBinding buildRetentionAnnotation(long bits, LookupEnvironment env) { ReferenceBinding retentionPolicy = env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, null); Object value = null; if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { value = retentionPolicy.getField(TypeConstants.UPPER_RUNTIME, true); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_CLASS, true); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_SOURCE, true); } return env.createAnnotation( env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTION, null), new ElementValuePair[] { new ElementValuePair(TypeConstants.VALUE, value, null) }); }
static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) { IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs(); int length = binaryPairs == null ? 0 : binaryPairs.length; ElementValuePair[] pairs = length == 0 ? Binding.NO_ELEMENT_VALUE_PAIRS : new ElementValuePair[length]; for (int i = 0; i < length; i++) pairs[i] = new ElementValuePair(binaryPairs[i].getName(), convertMemberValue(binaryPairs[i].getValue(), env, missingTypeNames), null); char[] typeName = annotationInfo.getTypeName(); ReferenceBinding annotationType = env.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames); return new UnresolvedAnnotationBinding(annotationType, pairs, env); }
static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) { IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs(); int length = binaryPairs == null ? 0 : binaryPairs.length; ElementValuePair[] pairs = length == 0 ? Binding.NO_ELEMENT_VALUE_PAIRS : new ElementValuePair[length]; for (int i = 0; i < length; i++) pairs[i] = new ElementValuePair(binaryPairs[i].getName(), convertMemberValue(binaryPairs[i].getValue(), env, missingTypeNames, false), null); char[] typeName = annotationInfo.getTypeName(); ReferenceBinding annotationType = env.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames); return env.createUnresolvedAnnotation(annotationType, pairs); }
static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) { IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs(); int length = binaryPairs == null ? 0 : binaryPairs.length; ElementValuePair[] pairs = length == 0 ? Binding.NO_ELEMENT_VALUE_PAIRS : new ElementValuePair[length]; for (int i = 0; i < length; i++) pairs[i] = new ElementValuePair(binaryPairs[i].getName(), convertMemberValue(binaryPairs[i].getValue(), env, missingTypeNames), null); char[] typeName = annotationInfo.getTypeName(); ReferenceBinding annotationType = env.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames); return new UnresolvedAnnotationBinding(annotationType, pairs, env); }
static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) { IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs(); int length = binaryPairs == null ? 0 : binaryPairs.length; ElementValuePair[] pairs = length == 0 ? Binding.NO_ELEMENT_VALUE_PAIRS : new ElementValuePair[length]; for (int i = 0; i < length; i++) pairs[i] = new ElementValuePair(binaryPairs[i].getName(), convertMemberValue(binaryPairs[i].getValue(), env, missingTypeNames, false), null); char[] typeName = annotationInfo.getTypeName(); ReferenceBinding annotationType = env.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames); return env.createUnresolvedAnnotation(annotationType, pairs); }
private static AnnotationBinding buildRetentionAnnotation(long bits, LookupEnvironment env) { ReferenceBinding retentionPolicy = env.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, null); Object value = null; if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { value = retentionPolicy.getField(TypeConstants.UPPER_RUNTIME, true); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_CLASS, true); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_SOURCE, true); } return env.createAnnotation( env.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTION, null), new ElementValuePair[] { new ElementValuePair(TypeConstants.VALUE, value, null) }); }
private static AnnotationBinding buildRetentionAnnotation(long bits, LookupEnvironment env) { ReferenceBinding retentionPolicy = env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, null); Object value = null; if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { value = retentionPolicy.getField(TypeConstants.UPPER_RUNTIME, true); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_CLASS, true); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_SOURCE, true); } return env.createAnnotation( env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTION, null), new ElementValuePair[] { new ElementValuePair(TypeConstants.VALUE, value, null) }); }
private static AnnotationBinding buildRetentionAnnotation(long bits, LookupEnvironment env) { ReferenceBinding retentionPolicy = env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, null); Object value = null; if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { value = retentionPolicy.getField(TypeConstants.UPPER_RUNTIME, true); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_CLASS, true); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_SOURCE, true); } return env.createAnnotation( env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTION, null), new ElementValuePair[] { new ElementValuePair(TypeConstants.VALUE, value, null) }); }
private static AnnotationBinding buildRetentionAnnotation(long bits, LookupEnvironment env) { ReferenceBinding retentionPolicy = env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, null); Object value = null; if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { value = retentionPolicy.getField(TypeConstants.UPPER_RUNTIME, true); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_CLASS, true); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_SOURCE, true); } return env.createAnnotation( env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTION, null), new ElementValuePair[] { new ElementValuePair(TypeConstants.VALUE, value, null) }); }
private static AnnotationBinding buildRetentionAnnotation(long bits, LookupEnvironment env) { ReferenceBinding retentionPolicy = env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, null); Object value = null; if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { value = retentionPolicy.getField(TypeConstants.UPPER_RUNTIME, true); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_CLASS, true); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_SOURCE, true); } return env.createAnnotation( env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTION, null), new ElementValuePair[] { new ElementValuePair(TypeConstants.VALUE, value, null) }); }
private static AnnotationBinding buildRetentionAnnotation(long bits, LookupEnvironment env) { ReferenceBinding retentionPolicy = env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, null); Object value = null; if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { value = retentionPolicy.getField(TypeConstants.UPPER_RUNTIME, true); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_CLASS, true); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_SOURCE, true); } return env.createAnnotation( env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTION, null), new ElementValuePair[] { new ElementValuePair(TypeConstants.VALUE, value, null) }); }
private static AnnotationBinding buildRetentionAnnotation(long bits, LookupEnvironment env) { ReferenceBinding retentionPolicy = env.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY, null); Object value = null; if ((bits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) { value = retentionPolicy.getField(TypeConstants.UPPER_RUNTIME, true); } else if ((bits & TagBits.AnnotationClassRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_CLASS, true); } else if ((bits & TagBits.AnnotationSourceRetention) != 0) { value = retentionPolicy.getField(TypeConstants.UPPER_SOURCE, true); } return env.createAnnotation( env.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_ANNOTATION_RETENTION, null), new ElementValuePair[] { new ElementValuePair(TypeConstants.VALUE, value, null) }); }
static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) { IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs(); int length = binaryPairs == null ? 0 : binaryPairs.length; ElementValuePair[] pairs = length == 0 ? Binding.NO_ELEMENT_VALUE_PAIRS : new ElementValuePair[length]; for (int i = 0; i < length; i++) pairs[i] = new ElementValuePair(binaryPairs[i].getName(), convertMemberValue(binaryPairs[i].getValue(), env, missingTypeNames, false), null); char[] typeName = annotationInfo.getTypeName(); LookupEnvironment env2 = annotationInfo.isExternalAnnotation() ? env.root : env; ReferenceBinding annotationType = env2.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames); return env2.createUnresolvedAnnotation(annotationType, pairs); }