Interface ReferenceFinder<C>

Type Parameters:
C - The type of the config object. For normal resources, this will be the config type "R" that matches the ResourceTypeMeta, and can be registered using DefaultResourceTypeMeta.Builder#referenceProperty(String, Consumer).

For extension point profile objects, this will be the type "P extends ExtensionPointProfileConfig" that matches the ExtensionPointResourceTypeMeta, and can be registered using ExtensionPointResourceTypeMeta.Builder#referenceProperty(String, Consumer).

For references specific to an extension point settings object, this will be the settings object type "S" of an ExtensionPoint, and can be registered using AbstractExtensionPoint.addReferenceProperty(String, Consumer).

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ReferenceFinder<C>
A functional interface for finding references to a target resource in a config object.
  • Method Details

    • findReference

      Optional<ReferenceUpdater<C>> findReference(C config, ResourcePath targetResource)
      Find references to the target resource in the given object
      Parameters:
      config - The config object to check and see if it references the target
      targetResource - The target to see if any properties of config reference
      Returns:
      A reference updater, if any reference was found. This object knows the name of the property that holds the reference, and the logic to create a new copy of the config object with the reference updated.