Class Patch


public final class Patch extends Operation
Class that represents the Patch operation type in API descriptor.
  • Method Details

    • getOperations

      public PatchOperation[] getOperations()
      Getter for supported Patch operations.
      Returns:
      Supported Patch operations
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Operation
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Operation
    • patch

      public static Patch.Builder patch()
      Creates a new builder for Patch.
      Returns:
      New builder instance
    • allocateToResource

      protected void allocateToResource(Resource.Builder resourceBuilder)
      Allocates the Patch operation type to the given Resource Builder.
      Specified by:
      allocateToResource in class Operation
      Parameters:
      resourceBuilder - - Resource Builder to add the operation
    • fromAnnotation

      public static Patch fromAnnotation(Patch patch, ApiDescription descriptor, Class<?> relativeType)
      Builds a Patch object from the data stored in the annotation.
      Parameters:
      patch - Patch annotation that holds the data
      descriptor - The root descriptor to add definitions to.
      relativeType - The type relative to which schema resources should be resolved.
      Returns:
      Patch instance