public class ClassProperties extends Object
Pojomator.doHashCode(Object)
,
Pojomator.doEquals(Object, Object)
, and Pojomator.doToString(Object)
.Modifier and Type | Method | Description |
---|---|---|
static ClassProperties |
forClass(Class<?> pojoClass) |
Get an instance for the given
pojoClass . |
Set<PropertyElement> |
getAllProperties() |
Get the union of all properties used for any Pojomator methods.
|
Collection<PropertyElement> |
getEqualsProperties() |
Gets the properties to use for
Pojomator.doEquals(Object, Object) . |
Collection<PropertyElement> |
getHashCodeProperties() |
Gets the properties to use for
Pojomator.doHashCode(Object) . |
Collection<PropertyElement> |
getToStringProperties() |
Gets the properties to use for
Pojomator.doToString(Object) . |
boolean |
isCompatibleForEquals(Class<?> otherClass) |
Whether instances of
otherClass are candidates for being equal to instances of
the class this ClassProperties instance was created for. |
public static ClassProperties forClass(Class<?> pojoClass) throws NoPojomaticPropertiesException
pojoClass
. Instances are cached, so calling this method
repeatedly is not inefficient.pojoClass
- the class to inspect for propertiesClassProperties
for pojoClass
.NoPojomaticPropertiesException
- if pojoClass
has no properties annotated for use
with Pojomatic.public Collection<PropertyElement> getEqualsProperties()
Pojomator.doEquals(Object, Object)
.Pojomator.doEquals(Object, Object)
.public Collection<PropertyElement> getHashCodeProperties()
Pojomator.doHashCode(Object)
.Pojomator.doHashCode(Object)
.public Collection<PropertyElement> getToStringProperties()
Pojomator.doToString(Object)
.Pojomator.doToString(Object)
.public Set<PropertyElement> getAllProperties()
public boolean isCompatibleForEquals(Class<?> otherClass)
otherClass
are candidates for being equal to instances of
the class this ClassProperties
instance was created for.otherClass
- the class to check for compatibility for equals with.true
if instances of otherClass
are candidates for being equal to
instances of the class this ClassProperties
instance was created for, or false
otherwise.Copyright © 2008–2018. All rights reserved.