Interface PropertyLifecycleContext

All Superinterfaces:

@API(status=MAINTAINED, since="1.4.0") public interface PropertyLifecycleContext extends LifecycleContext
The context information of a property or example.
  • Method Details

    • targetMethod

      Method targetMethod()
      The method that defines the current property or example.
      a Method instance
    • containerClass

      Class<?> containerClass()
      The container class in which the current property method is running.

      Most of the time that's also the defining class. It differs when running properties that are defined in a super class or an implemented interface.

      a Class instance
    • testInstance

      Object testInstance()
      The current instance of the property's container class. There is exactly one instance per property method.
      an instance of the container class in which the current property method is running
    • testInstances

      @API(status=MAINTAINED, since="1.5.4") List<Object> testInstances()
      The list of the current instance of the property's container class and all its outer objects if it has any. The result of testInstance() is the last in the list.
      List of instances starting from outer-most to inner-most class
    • extendedLabel

      @API(status=MAINTAINED, since="1.2.3") String extendedLabel()
      The extended label contains additional information about the current container class.
      a String
    • attributes

      @API(status=MAINTAINED, since="1.3.4") PropertyAttributes attributes()
      An object to query, set or change a property method's attributes.
      the attributes holder