Class ImmutableTypeReference
java.lang.Object
dk.mada.jaxrs.model.types.ImmutableTypeReference
- All Implemented Interfaces:
Reference, Type, TypeReference
@Generated(from="TypeReference",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTypeReference
extends Object
implements TypeReference
Immutable implementation of
TypeReference.
Use the builder to create immutable instances:
ImmutableTypeReference.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTypeReference. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTypeReference.static ImmutableTypeReferencecopyOf(TypeReference instance) Creates an immutable copy of aTypeReferencevalue.booleanThis instance is equal to all instances ofImmutableTypeReferencethat have equal attribute values.inthashCode()Computes a hash code from attributes:validation,refType.refType()Returns the referenced type.toString()Prints the immutable valueTypeReferencewith attribute values.Validation information that applies to this particular reference of the type.final ImmutableTypeReferencewithRefType(Type value) Copy the current immutable object by setting a value for therefTypeattribute.final ImmutableTypeReferencewithValidation(Validation value) Copy the current immutable object by setting a value for thevalidationattribute.Methods inherited from interface Type
isPlainObject, isPrimitive, isUUID, isValidationMethods inherited from interface TypeReference
isBigDecimal, isContainer, isDate, isDateTime, isDto, isEnum, isPrimitive, isTime, isVoid, neededImports, typeName, wrapperTypeName
-
Method Details
-
validation
Validation information that applies to this particular reference of the type.- Specified by:
validationin interfaceReference- Returns:
- the validation information.
-
refType
-
withValidation
Copy the current immutable object by setting a value for thevalidationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for validation- Returns:
- A modified copy or the
thisobject
-
withRefType
Copy the current immutable object by setting a value for therefTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for refType- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aTypeReferencevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable TypeReference instance
-
builder
Creates a builder forImmutableTypeReference.ImmutableTypeReference.builder() .validation(dk.mada.jaxrs.model.Validation) // required
validation.refType(dk.mada.jaxrs.model.types.Type) // requiredrefType.build();- Returns:
- A new ImmutableTypeReference builder
-