Class NullPropertyAssertion

java.lang.Object
info.ejava.assignments.aop.houserenters.util.NullPropertyAssertion
Direct Known Subclasses:
NullPropertyAssertionImpl

public abstract class NullPropertyAssertion extends Object
  • Constructor Details

    • NullPropertyAssertion

      public NullPropertyAssertion()
  • Method Details

    • assertNull

      public void assertNull(Object object, String property)
    • assertNotNull

      public void assertNotNull(Object object, String property)
    • assertConditions

      public void assertConditions(Object object, List<String> properties, boolean isNull)
    • makeAssertion

      protected void makeAssertion(Object object, String property, boolean isNull)
    • getterName

      protected String getterName(String property)
    • getGetterMethod

      protected abstract Optional<Method> 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.
      Parameters:
      object -
      getterName -
      Returns:
      method for getterName in class or null if does not exist
    • getValue

      protected abstract Object getValue(Object object, Method getterMethod)
      This method will return the value from the method.
      Parameters:
      object -
      getterMethod -
      Returns:
      result of calling method against object