List of usage examples for java.lang.reflect AccessibleObject equals
public boolean equals(Object obj)
From source file:com.yahoo.elide.core.EntityBinding.java
/** * Bind an id field to an entity./*from ww w . j a v a 2 s . com*/ * * @param cls Class type to bind fields * @param type JSON API type identifier * @param fieldOrMethod Field or method to bind */ private void bindEntityId(Class<?> cls, String type, AccessibleObject fieldOrMethod) { String fieldName = getFieldName(fieldOrMethod); Class<?> fieldType = getFieldType(fieldOrMethod); //Add id field to type map for the entity fieldsToTypes.put(fieldName, fieldType); //Set id field, type, and name idField = fieldOrMethod; idType = fieldType; idFieldName = fieldName; if (idField != null && !fieldOrMethod.equals(idField)) { throw new DuplicateMappingException(type + " " + cls.getName() + ":" + fieldName); } }