Class CliSchema.Builder

java.lang.Object
org.refcodes.schema.Schema.Builder
org.refcodes.cli.CliSchema.Builder
All Implemented Interfaces:
org.refcodes.exception.ExceptionAccessor.ExceptionBuilder<Throwable,org.refcodes.schema.Schema.Builder>, org.refcodes.mixin.AliasAccessor.AliasBuilder<org.refcodes.schema.Schema.Builder>, org.refcodes.mixin.ChildrenAccessor.ChildrenBuilder<org.refcodes.schema.Schema[],org.refcodes.schema.Schema.Builder>, org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<org.refcodes.schema.Schema.Builder>, org.refcodes.mixin.HashAccessor.HashBuilder<org.refcodes.schema.Schema.Builder>, org.refcodes.mixin.IdentifierAccessor.IdentifierBuilder<org.refcodes.schema.Schema.Builder>, org.refcodes.mixin.InstanceAccessor.InstanceBuilder<Object,org.refcodes.schema.Schema.Builder>, org.refcodes.mixin.KeyAccessor.KeyBuilder<String,org.refcodes.schema.Schema.Builder>, org.refcodes.mixin.StereotypeAccessor.StereotypeBuilder<String,org.refcodes.schema.Schema.Builder>, org.refcodes.mixin.TypeAccessor.TypeBuilder<Class<?>,org.refcodes.schema.Schema.Builder>, org.refcodes.mixin.ValueAccessor.ValueBuilder<Object,org.refcodes.schema.Schema.Builder>
Enclosing class:
CliSchema

public static final class CliSchema.Builder extends org.refcodes.schema.Schema.Builder
Builder for creating CliSchema instances.

The builder collects common schema metadata (identifier, alias, key, type, hash, description, stereotype, exception, value), custom options, and optional children.

  • Method Details

    • withIdentifier

      public CliSchema.Builder withIdentifier(String aIdentifier)
      Specified by:
      withIdentifier in interface org.refcodes.mixin.IdentifierAccessor.IdentifierBuilder<org.refcodes.schema.Schema.Builder>
      Overrides:
      withIdentifier in class org.refcodes.schema.Schema.Builder
    • withAlias

      public CliSchema.Builder withAlias(String aAlias)
      Specified by:
      withAlias in interface org.refcodes.mixin.AliasAccessor.AliasBuilder<org.refcodes.schema.Schema.Builder>
      Overrides:
      withAlias in class org.refcodes.schema.Schema.Builder
    • withKey

      public CliSchema.Builder withKey(String aKey)
      Specified by:
      withKey in interface org.refcodes.mixin.KeyAccessor.KeyBuilder<String,org.refcodes.schema.Schema.Builder>
      Overrides:
      withKey in class org.refcodes.schema.Schema.Builder
    • withType

      public CliSchema.Builder withType(Class aType)
      Specified by:
      withType in interface org.refcodes.mixin.TypeAccessor.TypeBuilder<Class<?>,org.refcodes.schema.Schema.Builder>
      Overrides:
      withType in class org.refcodes.schema.Schema.Builder
    • withHash

      public CliSchema.Builder withHash(int aHash)
      Specified by:
      withHash in interface org.refcodes.mixin.HashAccessor.HashBuilder<org.refcodes.schema.Schema.Builder>
      Overrides:
      withHash in class org.refcodes.schema.Schema.Builder
    • withInstance

      public CliSchema.Builder withInstance(Object aInstance)
      Specified by:
      withInstance in interface org.refcodes.mixin.InstanceAccessor.InstanceBuilder<Object,org.refcodes.schema.Schema.Builder>
      Overrides:
      withInstance in class org.refcodes.schema.Schema.Builder
    • withStereotype

      public CliSchema.Builder withStereotype(String aStereotype)
      Specified by:
      withStereotype in interface org.refcodes.mixin.StereotypeAccessor.StereotypeBuilder<String,org.refcodes.schema.Schema.Builder>
      Overrides:
      withStereotype in class org.refcodes.schema.Schema.Builder
    • withValue

      public CliSchema.Builder withValue(Object aValue)
      Specified by:
      withValue in interface org.refcodes.mixin.ValueAccessor.ValueBuilder<Object,org.refcodes.schema.Schema.Builder>
      Overrides:
      withValue in class org.refcodes.schema.Schema.Builder
    • withException

      public CliSchema.Builder withException(Throwable aException)
      Specified by:
      withException in interface org.refcodes.exception.ExceptionAccessor.ExceptionBuilder<Throwable,org.refcodes.schema.Schema.Builder>
      Overrides:
      withException in class org.refcodes.schema.Schema.Builder
    • withDescription

      public CliSchema.Builder withDescription(String aDescription)
      Specified by:
      withDescription in interface org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<org.refcodes.schema.Schema.Builder>
      Overrides:
      withDescription in class org.refcodes.schema.Schema.Builder
    • withSchema

      public CliSchema.Builder withSchema(org.refcodes.schema.Schema aSchema)
      Overrides:
      withSchema in class org.refcodes.schema.Schema.Builder
    • withChildren

      public CliSchema.Builder withChildren(org.refcodes.schema.Schema... aChildren)
      Specified by:
      withChildren in interface org.refcodes.mixin.ChildrenAccessor.ChildrenBuilder<org.refcodes.schema.Schema[],org.refcodes.schema.Schema.Builder>
      Overrides:
      withChildren in class org.refcodes.schema.Schema.Builder
    • withChildren

      public CliSchema.Builder withChildren(Collection<? extends org.refcodes.schema.Schema> aChildren)
      Overrides:
      withChildren in class org.refcodes.schema.Schema.Builder
    • withProperty

      public CliSchema.Builder withProperty(String aKey, Object aValue)
      Overrides:
      withProperty in class org.refcodes.schema.Schema.Builder
    • build

      public CliSchema build()
      Builder method of the builder.
      Overrides:
      build in class org.refcodes.schema.Schema.Builder
      Returns:
      The built instance.