public FieldDescriptor toFieldDescriptor() { return DescriptorFactory.instance().getFieldDescriptor(this); } /**
@SuppressFBWarnings("ES_COMPARING_STRINGS_WITH_EQ") public FieldDescriptor getFieldDescriptorOperand() { if (nameConstantOperand == NOT_AVAILABLE) { throw new IllegalStateException("getFieldDescriptorOperand called but value not available"); } if (referencedField == null) { referencedField = DescriptorFactory.instance().getFieldDescriptor(classConstantOperand, nameConstantOperand, sigConstantOperand, opcode == Const.GETSTATIC || opcode == Const.PUTSTATIC); } return referencedField; }
public static @Nonnull XField getExactXField(@SlashedClassName String className, Field f) { FieldDescriptor fd = DescriptorFactory.instance().getFieldDescriptor(className, f); return getExactXField(fd); }
@Override protected FieldDescriptor parseKey(String s) throws PropertyDatabaseFormatException { String[] tuple = s.split(","); if (tuple.length != 4) { throw new PropertyDatabaseFormatException("Invalid field tuple: " + s); } String className = tuple[0]; String fieldName = tuple[1]; String signature = tuple[2]; int accessFlags; try { accessFlags = Integer.parseInt(tuple[3]); } catch (NumberFormatException e) { throw new PropertyDatabaseFormatException("Invalid field access flags: " + tuple[3]); } return DescriptorFactory.instance().getFieldDescriptor(ClassName.toSlashedClassName(className), fieldName, signature, (accessFlags & Const.ACC_STATIC) != 0); }
/** * Create an XField object * * @param className * @param fieldName * @param fieldSignature * @param isStatic * @return the created XField */ public static XField createXFieldUsingSlashedClassName(@SlashedClassName String className, String fieldName, String fieldSignature, boolean isStatic) { FieldDescriptor fieldDesc = DescriptorFactory.instance().getFieldDescriptor(className, fieldName, fieldSignature, isStatic); return createXField(fieldDesc); }
public FieldDescriptor getFieldDescriptor(@SlashedClassName String className, Field ma) { return getFieldDescriptor(className, ma.getName(), ma.getSignature(), ma.isStatic()); }
/** * Create an XField object * * @param className * @param fieldName * @param fieldSignature * @param isStatic * @return the created XField */ public static XField createXField(@DottedClassName String className, String fieldName, String fieldSignature, boolean isStatic) { FieldDescriptor fieldDesc = DescriptorFactory.instance().getFieldDescriptor(ClassName.toSlashedClassName(className), fieldName, fieldSignature, isStatic); return createXField(fieldDesc); }
public FieldDescriptor getFieldDescriptor(FieldAnnotation ma) { return getFieldDescriptor(ClassName.toSlashedClassName(ma.getClassName()), ma.getFieldName(), ma.getFieldSignature(), ma.isStatic()); }
/** * Get an XField object exactly matching given class, name, and signature. * May return an unresolved object (if the class can't be found, or does not * directly declare named field). * * @param className * name of class containing the field * @param name * name of field * @param signature * field signature * @param isStatic * field access flags * @return XField exactly matching class name, field name, and field * signature */ public static XField getExactXField(@SlashedClassName String className, String name, String signature, boolean isStatic) { FieldDescriptor fieldDesc = DescriptorFactory.instance().getFieldDescriptor(ClassName.toSlashedClassName(className), name, signature, isStatic); return getExactXField(fieldDesc); }
ClassDescriptor d = worklist.removeFirst(); if (!d.equals(originalClassDescriptor)) { desc = DescriptorFactory.instance().getFieldDescriptor(d.getClassName(), desc.getName(), desc.getSignature(), desc.isStatic());
@Override public FieldDescriptor getFieldDescriptor() { return DescriptorFactory.instance().getFieldDescriptor(getClassDescriptor().getClassName(), getName(), getSignature(), isStatic()); } }
/** * Get FieldDescriptor describing the field accessed by given * FieldInstruction. * * @param fins * a FieldInstruction * @param cpg * ConstantPoolGen for the method containing the FieldInstruction * @return FieldDescriptor describing the field accessed by given * FieldInstruction */ public static FieldDescriptor getAccessedFieldDescriptor(FieldInstruction fins, ConstantPoolGen cpg) { String className = fins.getClassName(cpg); String fieldName = fins.getName(cpg); String fieldSig = fins.getSignature(cpg); boolean isStatic = (fins.getOpcode() == Const.GETSTATIC || fins.getOpcode() == Const.PUTSTATIC); return DescriptorFactory.instance().getFieldDescriptor(className, fieldName, fieldSig, isStatic); }
@SuppressFBWarnings("ES_COMPARING_STRINGS_WITH_EQ") public FieldDescriptor getFieldDescriptorOperand() { if (nameConstantOperand == NOT_AVAILABLE) { throw new IllegalStateException("getFieldDescriptorOperand called but value not available"); } if (referencedField == null) { referencedField = DescriptorFactory.instance().getFieldDescriptor(classConstantOperand, nameConstantOperand, sigConstantOperand, opcode == GETSTATIC || opcode == PUTSTATIC); } return referencedField; }
public FieldDescriptor toFieldDescriptor() { return DescriptorFactory.instance().getFieldDescriptor(this); } /**
public static @Nonnull XField getExactXField(@SlashedClassName String className, Field f) { FieldDescriptor fd = DescriptorFactory.instance().getFieldDescriptor(className, f); return getExactXField(fd); }
/** * Create an XField object * * @param className * @param fieldName * @param fieldSignature * @param isStatic * @return the created XField */ public static XField createXFieldUsingSlashedClassName(@SlashedClassName String className, String fieldName, String fieldSignature, boolean isStatic) { FieldDescriptor fieldDesc = DescriptorFactory.instance().getFieldDescriptor(className, fieldName, fieldSignature, isStatic); return createXField(fieldDesc); }
/** * Create an XField object * * @param className * @param fieldName * @param fieldSignature * @param isStatic * @return the created XField */ public static XField createXField(@DottedClassName String className, String fieldName, String fieldSignature, boolean isStatic) { FieldDescriptor fieldDesc = DescriptorFactory.instance().getFieldDescriptor(ClassName.toSlashedClassName(className), fieldName, fieldSignature, isStatic); return createXField(fieldDesc); }
public FieldDescriptor getFieldDescriptor(@SlashedClassName String className, Field ma) { return getFieldDescriptor(className, ma.getName(), ma.getSignature(), ma.isStatic()); }
public FieldDescriptor getFieldDescriptor(FieldAnnotation ma) { return getFieldDescriptor(ClassName.toSlashedClassName(ma.getClassName()), ma.getFieldName(), ma.getFieldSignature(), ma.isStatic()); }
@Override public FieldDescriptor getFieldDescriptor() { return DescriptorFactory.instance().getFieldDescriptor(getClassDescriptor().getClassName(), getName(), getSignature(), isStatic()); } }