Interface ClassNames


public interface ClassNames
The core classes of one contract, as the core emitter names them.
  • Method Details

    • all

      Every core class, in the order the contract declares what they come from.
      Returns:
      the classes
    • component

      Optional<GeneratedClass> component(Origin origin, String componentName)
      The class for a component.
      Parameters:
      origin - Origin.SCHEMA, Origin.RESPONSE, Origin.PARAMETER or Origin.REQUEST_BODY
      componentName - the component's name
      Returns:
      the class, or empty when there is none
    • operation

      Optional<GeneratedClass> operation(String location)
      The class for an operation.
      Parameters:
      location - the JSON pointer of the operation, such as /paths/~1v1~1users/get
      Returns:
      the class, or empty when there is none
    • inline

      Optional<GeneratedClass> inline(String location)
      The class for a schema written inline in an operation.
      Parameters:
      location - the JSON pointer of the schema
      Returns:
      the class, or empty when the schema has none
    • contractCases

      default Optional<GeneratedClass> contractCases(String location)
      The class that lists an operation's contract cases, such as InitiateUserRegistrationContractCases: generated for every operation, with no cases where the contract gives nothing to derive one from. It is not one of all(), which lists the classes the contract's components and operations are generated into.
      Parameters:
      location - the JSON pointer of the operation, such as /paths/~1v1~1users/get
      Returns:
      the class, or empty when there is none