public Object getConstant() throws JavaModelException { IBinaryField info = (IBinaryField) getElementInfo(); return convertConstant(info.getConstant()); } /*
public Object getConstant() throws JavaModelException { IBinaryField info = (IBinaryField) getElementInfo(); return convertConstant(info.getConstant()); } /*
public Object getConstant() throws JavaModelException { IBinaryField info = (IBinaryField) getElementInfo(); return convertConstant(info.getConstant()); } /*
@Override public Object getConstant() throws JavaModelException { IBinaryField info = (IBinaryField) getElementInfo(); return convertConstant(info.getConstant()); } /*
public Object getConstant() throws JavaModelException { IBinaryField info = (IBinaryField) getElementInfo(); return convertConstant(info.getConstant()); } /*
public Object getConstant() throws JavaModelException { IBinaryField info = (IBinaryField) getElementInfo(); return convertConstant(info.getConstant()); } /*
private static void compareFields(String contextPrefix, IBinaryField field1, IBinaryField field2) { contextPrefix = contextPrefix + "." + safeString(field1.getName()); //$NON-NLS-1$ compareAnnotations(contextPrefix, field1.getAnnotations(), field2.getAnnotations()); assertEquals(contextPrefix + ": Constants not equal", field1.getConstant(), field2.getConstant()); //$NON-NLS-1$ compareGenericSignatures(contextPrefix + ": The generic signature did not match", field1.getGenericSignature(), //$NON-NLS-1$ field2.getGenericSignature()); assertEquals(contextPrefix + ": The modifiers did not match", field1.getModifiers(), field2.getModifiers()); //$NON-NLS-1$ assertEquals(contextPrefix + ": The tag bits did not match", field1.getTagBits(), field2.getTagBits()); //$NON-NLS-1$ assertEquals(contextPrefix + ": The names did not match", field1.getName(), field2.getName()); //$NON-NLS-1$ compareTypeAnnotations(contextPrefix, field1.getTypeAnnotations(), field2.getTypeAnnotations()); assertEquals(contextPrefix + ": The type names did not match", field1.getTypeName(), field2.getTypeName()); //$NON-NLS-1$ }
private static void compareFields(String contextPrefix, IBinaryField field1, IBinaryField field2) { contextPrefix = contextPrefix + "." + safeString(field1.getName()); //$NON-NLS-1$ compareAnnotations(contextPrefix, field1.getAnnotations(), field2.getAnnotations()); assertEquals(contextPrefix + ": Constants not equal", field1.getConstant(), field2.getConstant()); //$NON-NLS-1$ compareGenericSignatures(contextPrefix + ": The generic signature did not match", field1.getGenericSignature(), //$NON-NLS-1$ field2.getGenericSignature()); assertEquals(contextPrefix + ": The modifiers did not match", field1.getModifiers(), field2.getModifiers()); //$NON-NLS-1$ assertEquals(contextPrefix + ": The tag bits did not match", field1.getTagBits(), field2.getTagBits()); //$NON-NLS-1$ assertEquals(contextPrefix + ": The names did not match", field1.getName(), field2.getName()); //$NON-NLS-1$ compareTypeAnnotations(contextPrefix, field1.getTypeAnnotations(), field2.getTypeAnnotations()); assertEquals(contextPrefix + ": The type names did not match", field1.getTypeName(), field2.getTypeName()); //$NON-NLS-1$ }
binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); if (firstAnnotatedFieldIndex < 0 && this.environment.globalOptions.storeAnnotations
binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); if (firstAnnotatedFieldIndex < 0 && this.environment.globalOptions.storeAnnotations
binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); if (firstAnnotatedFieldIndex < 0 && this.environment.globalOptions.storeAnnotations
binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); if (firstAnnotatedFieldIndex < 0 && this.environment.globalOptions.storeAnnotations
binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); if (firstAnnotatedFieldIndex < 0 && this.environment.globalOptions.storeAnnotations
binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); if (firstAnnotatedFieldIndex < 0 && this.environment.globalOptions.storeAnnotations
binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); if (firstAnnotatedFieldIndex < 0 && this.environment.globalOptions.storeAnnotations
binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); if (firstAnnotatedFieldIndex < 0 && this.environment.globalOptions.storeAnnotations
binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); if (firstAnnotatedFieldIndex < 0 && this.environment.globalOptions.storeAnnotations
/** * Adds the given field to the given type */ private void addField(NdType type, IBinaryField nextField) throws CoreException { NdVariable variable = type.createVariable(); variable.setName(nextField.getName()); if (nextField.getGenericSignature() != null) { variable.setVariableFlag(NdVariable.FLG_GENERIC_SIGNATURE_PRESENT); } attachAnnotations(variable, nextField.getAnnotations()); variable.setConstant(NdConstant.create(getNd(), nextField.getConstant())); variable.setModifiers(nextField.getModifiers()); SignatureWrapper nextTypeSignature = GenericSignatures.getGenericSignatureFor(nextField); IBinaryTypeAnnotation[] typeAnnotations = nextField.getTypeAnnotations(); if (typeAnnotations != null) { variable.allocateTypeAnnotations(typeAnnotations.length); for (IBinaryTypeAnnotation next : typeAnnotations) { NdTypeAnnotation annotation = variable.createTypeAnnotation(); initTypeAnnotation(annotation, next); } } variable.setType(createTypeSignature(nextTypeSignature, nextField.getTypeName())); variable.setTagBits(nextField.getTagBits()); }
binaryField.getModifiers() | ExtraCompilerModifiers.AccUnresolved, this, binaryField.getConstant()); boolean forceStoreAnnotations = !this.environment.globalOptions.storeAnnotations && (this.environment.globalOptions.sourceLevel >= ClassFileConstants.JDK9
/** * Adds the given field to the given type */ private void addField(NdType type, IBinaryField nextField) throws CoreException { NdVariable variable = type.createVariable(); variable.setName(nextField.getName()); if (nextField.getGenericSignature() != null) { variable.setVariableFlag(NdVariable.FLG_GENERIC_SIGNATURE_PRESENT); } attachAnnotations(variable, nextField.getAnnotations()); variable.setConstant(NdConstant.create(getNd(), nextField.getConstant())); variable.setModifiers(nextField.getModifiers()); SignatureWrapper nextTypeSignature = GenericSignatures.getGenericSignatureFor(nextField); IBinaryTypeAnnotation[] typeAnnotations = nextField.getTypeAnnotations(); if (typeAnnotations != null) { variable.allocateTypeAnnotations(typeAnnotations.length); for (IBinaryTypeAnnotation next : typeAnnotations) { NdTypeAnnotation annotation = variable.createTypeAnnotation(); initTypeAnnotation(annotation, next); } } variable.setType(createTypeSignature(nextTypeSignature, nextField.getTypeName())); variable.setTagBits(nextField.getTagBits()); }