Class InstanceWrapper<T>

  • Type Parameters:
    T - Type of wrapped instance

    @Beta
    @PublicAPI
    public class InstanceWrapper<T>
    extends Object
    Wrapper for Instances.

    Note that usually instances actual are immutable (because of being parameter objects or enums). Some of them have associated builder classes.

    Please note that this class is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.

    • Method Detail

      • get

        public T get()
        Get the actual wrapped instance.

        Please note that instance might be immutable, in this case associated builder should be used.

        Returns:
        Wrapped instance
      • getBuilder

        public com.google.common.base.Optional<ParameterBuilder<T>> getBuilder()
        Get an associated builder for the given instance if exists.
        Returns:
        associated builder
      • getShortName

        public String getShortName()
        Represented instance short name - from its Description annotation.
        Returns:
        Short name
      • getName

        public String getName()
        Represented instance name - from its Description annotation.
        Returns:
        Name
      • getDescription

        public String getDescription()
        Represented instance description - from its description annotation.
        Returns:
        Description of the represented instance