public Field getFieldOrNull(Class definedIn, String fieldName) { return fieldDictionary.fieldOrNull(definedIn, fieldName, null); }
/** * @deprecated As of 1.4.5, use {@link #getFieldOrNull(Class, String)} instead */ public boolean fieldDefinedInClass(String fieldName, Class type) { Field field = fieldDictionary.fieldOrNull(type, fieldName, null); return field != null && fieldModifiersSupported(field); }
/** * Returns an specific field of some class. If definedIn is null, it searches for the field named 'name' inside the * class cls. If definedIn is different than null, tries to find the specified field name in the specified class cls * which should be defined in class definedIn (either equals cls or a one of it's superclasses) * * @param cls the class where the field is to be searched * @param name the field name * @param definedIn the superclass (or the class itself) of cls where the field was defined * @return the field itself * @throws ObjectAccessException if no field can be found */ public Field field(final Class cls, final String name, final Class definedIn) { final Field field = fieldOrNull(cls, name, definedIn); if (field == null) { throw new MissingFieldException(cls.getName(), name); } else { return field; } }
public Field getFieldOrNull(Class definedIn, String fieldName) { return fieldDictionary.fieldOrNull(definedIn, fieldName, null); }
@Override public Field getFieldOrNull(final Class<?> definedIn, final String fieldName) { return fieldDictionary.fieldOrNull(definedIn, fieldName, null); }
public Field getFieldOrNull(Class definedIn, String fieldName) { return fieldDictionary.fieldOrNull(definedIn, fieldName, null); }
public Field getFieldOrNull(Class definedIn, String fieldName) { return fieldDictionary.fieldOrNull(definedIn, fieldName, null); }
public Field getFieldOrNull(Class definedIn, String fieldName) { return fieldDictionary.fieldOrNull(definedIn, fieldName, null); }
public Field getFieldOrNull(Class definedIn, String fieldName) { return fieldDictionary.fieldOrNull(definedIn, fieldName, null); }
public boolean fieldDefinedInClass(String fieldName, Class type) { Field field = fieldDictionary.fieldOrNull(type, fieldName, null); if(field==null) return false; return fieldModifiersSupported(field) || Modifier.isTransient(field.getModifiers()); }
/** * @deprecated As of 1.4.5, use {@link #getFieldOrNull(Class, String)} instead */ public boolean fieldDefinedInClass(String fieldName, Class type) { Field field = fieldDictionary.fieldOrNull(type, fieldName, null); return field != null && fieldModifiersSupported(field); }
/** * @deprecated As of 1.4.5, use {@link #getFieldOrNull(Class, String)} instead */ @Deprecated @Override public boolean fieldDefinedInClass(final String fieldName, final Class<?> type) { final Field field = fieldDictionary.fieldOrNull(type, fieldName, null); return field != null && fieldModifiersSupported(field); }
/** * @deprecated As of 1.4.5, use {@link #getFieldOrNull(Class, String)} instead */ public boolean fieldDefinedInClass(String fieldName, Class type) { Field field = fieldDictionary.fieldOrNull(type, fieldName, null); return field != null && fieldModifiersSupported(field); }
/** * @deprecated As of 1.4.5, use {@link #getFieldOrNull(Class, String)} instead */ public boolean fieldDefinedInClass(String fieldName, Class type) { Field field = fieldDictionary.fieldOrNull(type, fieldName, null); return field != null && fieldModifiersSupported(field); }
/** * @deprecated As of 1.4.5, use {@link #getFieldOrNull(Class, String)} instead */ public boolean fieldDefinedInClass(String fieldName, Class type) { Field field = fieldDictionary.fieldOrNull(type, fieldName, null); return field != null && fieldModifiersSupported(field); }
public boolean fieldDefinedInClass(String fieldName, Class type) { Field field = fieldDictionary.fieldOrNull(type, fieldName, null); return field != null && (fieldModifiersSupported(field) || Modifier.isTransient(field.getModifiers())); }
/** * Returns an specific field of some class. If definedIn is null, it searches for the field named 'name' inside the * class cls. If definedIn is different than null, tries to find the specified field name in the specified class cls * which should be defined in class definedIn (either equals cls or a one of it's superclasses) * * @param cls the class where the field is to be searched * @param name the field name * @param definedIn the superclass (or the class itself) of cls where the field was defined * @return the field itself * @throws ObjectAccessException if no field can be found */ public Field field(final Class<?> cls, final String name, final Class<?> definedIn) { final Field field = fieldOrNull(cls, name, definedIn); if (field == null) { throw new MissingFieldException(cls.getName(), name); } else { return field; } }
/** * Returns an specific field of some class. If definedIn is null, it searches for the field named 'name' inside the * class cls. If definedIn is different than null, tries to find the specified field name in the specified class cls * which should be defined in class definedIn (either equals cls or a one of it's superclasses) * * @param cls the class where the field is to be searched * @param name the field name * @param definedIn the superclass (or the class itself) of cls where the field was defined * @return the field itself * @throws ObjectAccessException if no field can be found */ public Field field(final Class cls, final String name, final Class definedIn) { final Field field = fieldOrNull(cls, name, definedIn); if (field == null) { throw new MissingFieldException(cls.getName(), name); } else { return field; } }
/** * Returns an specific field of some class. If definedIn is null, it searches for the field named 'name' inside the * class cls. If definedIn is different than null, tries to find the specified field name in the specified class cls * which should be defined in class definedIn (either equals cls or a one of it's superclasses) * * @param cls the class where the field is to be searched * @param name the field name * @param definedIn the superclass (or the class itself) of cls where the field was defined * @return the field itself * @throws ObjectAccessException if no field can be found */ public Field field(final Class cls, final String name, final Class definedIn) { final Field field = fieldOrNull(cls, name, definedIn); if (field == null) { throw new MissingFieldException(cls.getName(), name); } else { return field; } }
/** * Returns an specific field of some class. If definedIn is null, it searches for the field * named 'name' inside the class cls. If definedIn is different than null, tries to find the * specified field name in the specified class cls which should be defined in class * definedIn (either equals cls or a one of it's superclasses) * * @param cls the class where the field is to be searched * @param name the field name * @param definedIn the superclass (or the class itself) of cls where the field was defined * @return the field itself */ public Field field(Class cls, String name, Class definedIn) { Field field = fieldOrNull(cls,name,definedIn); if (field == null) { throw new NonExistentFieldException("No such field " + cls.getName() + "." + name,name); } else { return field; } }