Package dk.mada.jaxrs.model.types
Class ImmutableTypeInterface
java.lang.Object
dk.mada.jaxrs.model.types.ImmutableTypeInterface
- All Implemented Interfaces:
Type,TypeInterface
@Generated(from="TypeInterface",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTypeInterface
extends Object
implements TypeInterface
Immutable implementation of
TypeInterface.
Use the builder to create immutable instances:
ImmutableTypeInterface.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTypeInterface. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTypeInterface.static ImmutableTypeInterfacecopyOf(TypeInterface instance) Creates an immutable copy of aTypeInterfacevalue.booleanThis instance is equal to all instances ofImmutableTypeInterfacethat have equal attribute values.inthashCode()Computes a hash code from attributes:typeName,packageName,implementations.Returns the type names implementing this interface.Returns the name of the package the interface is generated in.toString()Prints the immutable valueTypeInterfacewith attribute values.typeName()Returns the type name.final ImmutableTypeInterfacewithImplementations(TypeName... elements) Copy the current immutable object with elements that replace the content ofimplementations.final ImmutableTypeInterfacewithImplementations(Iterable<? extends TypeName> elements) Copy the current immutable object with elements that replace the content ofimplementations.final ImmutableTypeInterfacewithPackageName(String value) Copy the current immutable object by setting a value for thepackageNameattribute.final ImmutableTypeInterfacewithTypeName(TypeName value) Copy the current immutable object by setting a value for thetypeNameattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dk.mada.jaxrs.model.types.Type
isBigDecimal, isContainer, isDate, isDateTime, isDto, isEnum, isPlainObject, isPrimitive, isPrimitive, isTime, isUUID, isValidation, isVoid, wrapperTypeNameMethods inherited from interface dk.mada.jaxrs.model.types.TypeInterface
neededImports
-
Method Details
-
typeName
Returns the type name. -
packageName
Returns the name of the package the interface is generated in.- Specified by:
packageNamein interfaceTypeInterface- Returns:
- the name of the package the interface is generated in
-
implementations
Returns the type names implementing this interface.- Specified by:
implementationsin interfaceTypeInterface- Returns:
- the type names implementing this interface
-
withTypeName
Copy the current immutable object by setting a value for thetypeNameattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for typeName- Returns:
- A modified copy or the
thisobject
-
withPackageName
Copy the current immutable object by setting a value for thepackageNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for packageName- Returns:
- A modified copy or the
thisobject
-
withImplementations
Copy the current immutable object with elements that replace the content ofimplementations.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withImplementations
Copy the current immutable object with elements that replace the content ofimplementations. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of implementations elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableTypeInterfacethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:typeName,packageName,implementations. -
toString
Prints the immutable valueTypeInterfacewith attribute values. -
copyOf
Creates an immutable copy of aTypeInterfacevalue. 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 TypeInterface instance
-
builder
Creates a builder forImmutableTypeInterface.ImmutableTypeInterface.builder() .typeName(dk.mada.jaxrs.model.types.TypeName) // requiredtypeName.packageName(String) // requiredpackageName.addImplementations|addAllImplementations(dk.mada.jaxrs.model.types.TypeName) //implementationselements .build();- Returns:
- A new ImmutableTypeInterface builder
-