Package Torello.Browser
Class TypeAssignmentException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- Torello.Java.WrongMethodException
-
- Torello.Browser.TypeAssignmentException
-
- All Implemented Interfaces:
java.io.Serializable
public class TypeAssignmentException extends WrongMethodException
Thrown byAbstractBuilderwhen a programmer attempts to assign a value using a Java type that is incompatible with the builder property's expected type.👉 This exception provides several "convenience fields" intended to assist with detailed error reporting and debugging diagnostics.- See Also:
AbstractBuilder, Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/TypeAssignmentException.java
- Open New Browser-Tab: Torello/Browser/TypeAssignmentException.java
File Size: 4,439 Bytes Line Count: 125 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field static longserialVersionUID'final'Exception Convenience FieldsModifier and Type Field AbstractDescriptordescriptorbyteexpectedTypeStringnamebyteprovidedType
-
Constructor Summary
Constructors Constructor TypeAssignmentException(byte providedType, byte expectedType, String name, AbstractDescriptor descriptor)TypeAssignmentException(String message, byte providedType, byte expectedType, String name, AbstractDescriptor descriptor)
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable. Using theSerializableImplementation 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'sjava.lang.Exceptionandjava.lang.Errorclasses implement theSerializable 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 name of the builder property being assigned when this exception was thrown.💡 For aTypeBuilder, this name identifies a field in the CDP type being built. For aCommandBuilder, it identifies one of the command's input parameters.- Code:
- Exact Field Declaration Expression:
public final String name;
-
providedType
public final byte providedType
-
expectedType
public final byte expectedType
-
descriptor
public final AbstractDescriptor descriptor
The descriptor whose builder property was being assigned 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
-
TypeAssignmentException
public TypeAssignmentException(byte providedType, byte expectedType, java.lang.String name, AbstractDescriptor descriptor)
Constructs aTypeAssignmentExceptionwith the default error message.- Parameters:
providedType- the byte constant describing the type supplied by the programmer.expectedType- the byte constant describing the type expected by the descriptor.name- the name of the builder property being assigned.descriptor- the descriptor used by the builder.- See Also:
CDPTypes
-
TypeAssignmentException
public TypeAssignmentException(java.lang.String message, byte providedType, byte expectedType, java.lang.String name, AbstractDescriptor descriptor)
Constructs aTypeAssignmentExceptionwith the specified detail message.- Parameters:
message- the detail message.providedType- the byte constant describing the type supplied by the programmer.expectedType- the byte constant describing the type expected by the descriptor.name- the name of the builder property being assigned.descriptor- the descriptor used by the builder.
-
-