Interface ReferenceAttribute

All Superinterfaces:
Attribute

public interface ReferenceAttribute extends Attribute

This type represents an attribute whose value is a key reference.


Example to create an instance using the builder pattern

     ReferenceAttribute referenceAttribute = ReferenceAttribute.builder()
             .value(valueBuilder -> valueBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getValue

      @NotNull @Valid @NotNull @Valid KeyReference getValue()

      References a resource by key.

      Returns:
      value
    • setValue

      void setValue(KeyReference value)

      References a resource by key.

      Parameters:
      value - value to be set
    • of

      static ReferenceAttribute of()
      factory method
      Returns:
      instance of ReferenceAttribute
    • of

      static ReferenceAttribute of(ReferenceAttribute template)
      factory method to create a shallow copy ReferenceAttribute
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ReferenceAttribute
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ReferenceAttributeBuilder builder()
      builder factory method for ReferenceAttribute
      Returns:
      builder
    • builder

      static ReferenceAttributeBuilder builder(ReferenceAttribute template)
      create builder for ReferenceAttribute instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withReferenceAttribute

      default <T> T withReferenceAttribute(Function<ReferenceAttribute,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ReferenceAttribute> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference