Class ResourceCapability



  • public class ResourceCapability
    extends Object
    Specification for resource used by a component.

    Note that optional will be set to true for create and delete operations. This reflects that typically we may or may not create/delete elements, even if all the prerequisites are met.

    • Constructor Detail

      • ResourceCapability

        public ResourceCapability​(Class<? extends Resource> type,
                                  boolean optional)
        Create from details
        Parameters:
        type - the resource type
        optional - true if the resource optional
      • ResourceCapability

        public ResourceCapability​(UsesResource annotation)
        Create from UsesResource.
        Parameters:
        annotation - specification
    • Method Detail

      • getType

        public Class<? extends Resource> getType​()
        Get the resource type created/deleted/processed
        Returns:
        resource type
      • isOptional

        public boolean isOptional​()
        Is the resource defined by this object optionally used (ie used is available)
        Returns:
        true if optional
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class Object