Class AssignmentNameException

  • All Implemented Interfaces:
    java.io.Serializable

    public class AssignmentNameException
    extends java.lang.IllegalArgumentException
    This exception throws if, when building a CDP instance with the 'advanced' TypeBuilder class, but a unknown field name has been passed by the user. The class TypeBuilder may be used in lieu of a class' constructor for a CDP data class in situation where the constructor would be completely unwieldy and inconvenient given the number of fields in the class.

    👉 This class offers a number of "convenience fields" to provide more comprehensive error reporting when something has failed.
    See Also:
    TypeBuilder, Serialized Form


    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        🡇     🗕  🗗  🗖
        public static final long serialVersionUID
        This fulfils the SerialVersion UID requirement for all classes that implement Java's interface java.io.Serializable. Using the Serializable Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.

        Note that Java's java.lang.Exception and java.lang.Error classes implement the Serializable interface, and a warning-free build expects this field be defined here.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
         public static final long serialVersionUID = 1;
        
      • name

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String name
        The unknown assignment name that was passed to one of the builder's accept(...) methods.

        👉 For a TypeBuilder, this name usually identifies a field in the CDP type being built. For a CommandBuilder, it usually identifies one of the command's input parameters.
        Code:
        Exact Field Declaration Expression:
         public final String name;
        
      • descriptor

        🡅  🡇     🗕  🗗  🗖
        public final AbstractDescriptor descriptor
        The descriptor used by the builder when this exception was thrown.

        👉 This field is provided as a programmer convenience, to make debugging and error investigation easier.
        Code:
        Exact Field Declaration Expression:
         public final AbstractDescriptor descriptor;
        
    • Constructor Detail

      • AssignmentNameException

        🡅  🡇     🗕  🗗  🗖
        public AssignmentNameException​(java.lang.String name,
                                       AbstractDescriptor descriptor)
        Constructs a AssignmentNameException with the default error message.
        Parameters:
        name - the unknown assignment name passed to the builder.
        descriptor - the descriptor used by the builder.
      • AssignmentNameException

        🡅     🗕  🗗  🗖
        public AssignmentNameException​(java.lang.String message,
                                       java.lang.String name,
                                       AbstractDescriptor descriptor)
        Constructs a AssignmentNameException with the specified detail message.
        Parameters:
        message - the detail message.
        name - the unknown assignment name passed to the builder.
        descriptor - the descriptor used by the builder.