Interface FactoryMethod

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
FactoryMethod.BuilderBase.FactoryMethodImpl

public interface FactoryMethod extends Prototype.Api
Static factory method metadata used by builder code generation.

Such methods can be used to map from configuration to a type, or from a prototype to a third party runtime-type.

See Also:
  • Method Details

    • builder

      static FactoryMethod.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static FactoryMethod.Builder builder(FactoryMethod instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • declaringType

      TypeName declaringType()
      Type declaring the factory method.
      Returns:
      type declaring the factory method
    • returnType

      TypeName returnType()
      Return type of the factory method.
      Returns:
      return type of the factory method
    • methodName

      String methodName()
      Name of the factory method.
      Returns:
      factory method name
    • parameterType

      Optional<TypeName> parameterType()
      A parameter of the factory method, if any.
      Returns:
      parameter type, if any
    • optionName

      Optional<String> optionName()
      A factory method may be bound to a specific option.
      Returns:
      name of the option this factory method is bound to, if any