Class EclipseResourceFactory
java.lang.Object
org.jdrupes.builder.eclipse.EclipseResourceFactory
- All Implemented Interfaces:
ResourceFactory
A factory for creating Java related resource objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewResource(ResourceType<T> type, Project project, Object... args) Returns a new resource of the given type if the factory instance can create it.
-
Constructor Details
-
EclipseResourceFactory
public EclipseResourceFactory()Instantiates a new java resource factory.
-
-
Method Details
-
newResource
public <T extends Resource> Optional<T> newResource(ResourceType<T> type, Project project, Object... args) Description copied from interface:ResourceFactoryReturns a new resource of the given type if the factory instance can create it.- Specified by:
newResourcein interfaceResourceFactory- Type Parameters:
T- the generic resource type- Parameters:
type- the resource typeproject- the projectargs- the additional arguments- Returns:
- the result.
Optional.empty()if the resource cannot be created by the factory instance.
-