Class NullPropertyAssertion
java.lang.Object
info.ejava.assignments.aop.houserenters.util.NullPropertyAssertion
- Direct Known Subclasses:
NullPropertyAssertionImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassertConditions(Object object, List<String> properties, boolean isNull) voidassertNotNull(Object object, String property) voidassertNull(Object object, String property) getGetterMethod(Object object, String getterName) This method obtains a Method to the property getter using the class of the provided object and getter method name.protected StringgetterName(String property) protected abstract ObjectThis method will return the value from the method.protected voidmakeAssertion(Object object, String property, boolean isNull)
-
Constructor Details
-
NullPropertyAssertion
public NullPropertyAssertion()
-
-
Method Details
-
assertNull
-
assertNotNull
-
assertConditions
-
makeAssertion
-
getterName
-
getGetterMethod
This method obtains a Method to the property getter using the class of the provided object and getter method name.- Parameters:
object-getterName-- Returns:
- method for getterName in class or null if does not exist
-
getValue
This method will return the value from the method.- Parameters:
object-getterMethod-- Returns:
- result of calling method against object
-