Class CoreResourceFactory

java.lang.Object
org.jdrupes.builder.core.CoreResourceFactory
All Implemented Interfaces:
ResourceFactory

public class CoreResourceFactory extends Object implements ResourceFactory
A factory for creating the Core resource objects.
  • Constructor Details

  • Method Details

    • addsMethod

      public static <T> boolean addsMethod(Class<T> base, Class<? extends T> derived)
      Checks if the derived interface adds any methods to the base interface.
      Type Parameters:
      T - the generic type
      Parameters:
      base - the base
      derived - the derived
      Returns:
      true, if successful
    • newResource

      public <T extends Resource> Optional<T> newResource(ResourceType<T> type, Project project, Object... args)
      Description copied from interface: ResourceFactory
      Returns a new resource of the given type if the factory instance can create it.
      Specified by:
      newResource in interface ResourceFactory
      Type Parameters:
      T - the generic resource type
      Parameters:
      type - the resource type
      project - the project
      args - the additional arguments
      Returns:
      the result. Optional.empty() if the resource cannot be created by the factory instance.