public Field findField(String name, String descriptor) { for (int index = 0; index < u2fieldsCount; index++) { Field field = fields[index]; if ((name == null || field.getName(this).equals(name)) && (descriptor == null || field.getDescriptor(this).equals(descriptor))) { return field; } } return null; }
public Field findField(String name, String descriptor) { for (int index = 0; index < u2fieldsCount; index++) { Field field = fields[index]; if ((name == null || field.getName(this).equals(name)) && (descriptor == null || field.getDescriptor(this).equals(descriptor))) { return field; } } return null; }
public Field findField(String name, String descriptor) { for (int index = 0; index < u2fieldsCount; index++) { Field field = fields[index]; if ((name == null || field.getName(this).equals(name)) && (descriptor == null || field.getDescriptor(this).equals(descriptor))) { return field; } } return null; }
public Field findField(String name, String descriptor) { for (int index = 0; index < u2fieldsCount; index++) { Field field = fields[index]; if ((name == null || field.getName(this).equals(name)) && (descriptor == null || field.getDescriptor(this).equals(descriptor))) { return field; } } return null; }
public Field findField(String name, String descriptor) { for (int index = 0; index < fields.length; index++) { Field field = fields[index]; if (field != null && (name == null || field.getName(this).equals(name)) && (descriptor == null || field.getDescriptor(this).equals(descriptor))) { return field; } } return null; }
public Field findField(String name, String descriptor) { for (int index = 0; index < fields.length; index++) { Field field = fields[index]; if (field != null && (name == null || field.getName(this).equals(name)) && (descriptor == null || field.getDescriptor(this).equals(descriptor))) { return field; } } return null; }
public Field findField(String name, String descriptor) { for (int index = 0; index < fields.length; index++) { Field field = fields[index]; if (field != null && (name == null || field.getName(this).equals(name)) && (descriptor == null || field.getDescriptor(this).equals(descriptor))) { return field; } } return null; }
public Field findField(String name, String descriptor) { for (int index = 0; index < fields.length; index++) { Field field = fields[index]; if (field != null && (name == null || field.getName(this).equals(name)) && (descriptor == null || field.getDescriptor(this).equals(descriptor))) { return field; } } return null; }
public FieldOptimizationInfo(Clazz clazz, Field field) { isWritten = isRead = (field.getAccessFlags() & ClassConstants.INTERNAL_ACC_VOLATILE) != 0; value = initialValue(field.getDescriptor(clazz)); }
/** * Lets the parameter visitor visit the type of the given field. */ private void visitFieldType(Clazz clazz, Field field, Clazz referencedClass) { String descriptor = field.getDescriptor(clazz); parameterVisitor.visitParameter(clazz, field, 0, 1, 0, ClassUtil.internalTypeSize(descriptor), descriptor, referencedClass); }
/** * Lets the parameter visitor visit the type of the given field. */ private void visitFieldType(Clazz clazz, Field field, Clazz referencedClass) { String descriptor = field.getDescriptor(clazz); parameterVisitor.visitParameter(clazz, field, 0, 1, 0, ClassUtil.internalTypeSize(descriptor), descriptor, referencedClass); }
/** * Lets the parameter visitor visit the type of the given field. */ private void visitFieldType(Clazz clazz, Field field, Clazz referencedClass) { String descriptor = field.getDescriptor(clazz); parameterVisitor.visitParameter(clazz, field, 0, 1, 0, ClassUtil.internalTypeSize(descriptor), descriptor, referencedClass); }
public void resetValue(Clazz clazz, Field field) { int accessFlags = field.getAccessFlags(); value = null; // See if we can initialize the static field with a constant value. if ((accessFlags & ClassConstants.ACC_STATIC) != 0) { field.accept(clazz, new AllAttributeVisitor(this)); } // Otherwise initialize a non-final field with the default value. // Conservatively, even a final field needs to be initialized with the // default value, because it may be accessed before it is set. if (value == null && (SideEffectInstructionChecker.OPTIMIZE_CONSERVATIVELY || (accessFlags & ClassConstants.ACC_FINAL) == 0)) { // Otherwise initialize the non-final field with the default value. value = INITIAL_VALUE_FACTORY.createValue(field.getDescriptor(clazz)); } }
public void resetValue(Clazz clazz, Field field) { int accessFlags = field.getAccessFlags(); value = null; // See if we can initialize the static field with a constant value. if ((accessFlags & ClassConstants.ACC_STATIC) != 0) { field.accept(clazz, new AllAttributeVisitor(this)); } // Otherwise initialize a non-final field with the default value. // Conservatively, even a final field needs to be initialized with the // default value, because it may be accessed before it is set. if (value == null && (SideEffectInstructionChecker.OPTIMIZE_CONSERVATIVELY || (accessFlags & ClassConstants.ACC_FINAL) == 0)) { // Otherwise initialize the non-final field with the default value. value = INITIAL_VALUE_FACTORY.createValue(field.getDescriptor(clazz)); } }
public void resetValue(Clazz clazz, Field field) { int accessFlags = field.getAccessFlags(); value = null; // See if we can initialize the static field with a constant value. if ((accessFlags & ClassConstants.ACC_STATIC) != 0) { field.accept(clazz, new AllAttributeVisitor(this)); } // Otherwise initialize a non-final field with the default value. // Conservatively, even a final field needs to be initialized with the // default value, because it may be accessed before it is set. if (value == null && (SideEffectInstructionChecker.OPTIMIZE_CONSERVATIVELY || (accessFlags & ClassConstants.ACC_FINAL) == 0)) { // Otherwise initialize the non-final field with the default value. value = INITIAL_VALUE_FACTORY.createValue(field.getDescriptor(clazz)); } }
/** * Returns whether the given field is shadowed anywhere down the class * hierarchy. */ public boolean isShadowed(Clazz clazz, Field field) { String name = field.getName(clazz); String descriptor = field.getDescriptor(clazz); // Go looking for the field down the class hierarchy. try { this.clazz = null; this.member = null; clazz.hierarchyAccept(false, false, false, true, new NamedFieldVisitor(name, descriptor, new MemberAccessFilter(0, ClassConstants.ACC_PRIVATE, this))); } catch (MemberFoundException ex) { // We've found a shadowing field. return true; } return false; }
/** * Returns whether the given field is shadowed anywhere down the class * hierarchy. */ public boolean isShadowed(Clazz clazz, Field field) { String name = field.getName(clazz); String descriptor = field.getDescriptor(clazz); // Go looking for the field down the class hierarchy. try { this.clazz = null; this.member = null; clazz.hierarchyAccept(false, false, false, true, new NamedFieldVisitor(name, descriptor, new MemberAccessFilter(0, ClassConstants.INTERNAL_ACC_PRIVATE, this))); } catch (MemberFoundException ex) { // We've found a shadowing field. return true; } return false; }
/** * Returns whether the given field is shadowed anywhere down the class * hierarchy. */ public boolean isShadowed(Clazz clazz, Field field) { String name = field.getName(clazz); String descriptor = field.getDescriptor(clazz); // Go looking for the field down the class hierarchy. try { this.clazz = null; this.member = null; clazz.hierarchyAccept(false, false, false, true, new NamedFieldVisitor(name, descriptor, new MemberAccessFilter(0, ClassConstants.ACC_PRIVATE, this))); } catch (MemberFoundException ex) { // We've found a shadowing field. return true; } return false; }
/** * Returns whether the given field is shadowed anywhere down the class * hierarchy. */ public boolean isShadowed(Clazz clazz, Field field) { String name = field.getName(clazz); String descriptor = field.getDescriptor(clazz); // Go looking for the field down the class hierarchy. try { this.clazz = null; this.member = null; clazz.hierarchyAccept(false, false, false, true, new NamedFieldVisitor(name, descriptor, new MemberAccessFilter(0, ClassConstants.ACC_PRIVATE, this))); } catch (MemberFoundException ex) { // We've found a shadowing field. return true; } return false; }