- java.lang.Object
-
- io.annot8.core.capabilities.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 Summary
Constructors Constructor Description ResourceCapability(UsesResource annotation)Create fromUsesResource.ResourceCapability(Class<? extends Resource> type, boolean optional)Create from details
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Class<? extends Resource>getType()Get the resource type created/deleted/processedinthashCode()booleanisOptional()Is the resource defined by this object optionally used (ie used is available)
-
-
-
Constructor Detail
-
ResourceCapability
public ResourceCapability(Class<? extends Resource> type, boolean optional)
Create from details- Parameters:
type- the resource typeoptional- true if the resource optional
-
ResourceCapability
public ResourceCapability(UsesResource annotation)
Create fromUsesResource.- Parameters:
annotation- specification
-
-