Class ClassSpecImpl
java.lang.Object
org.tquadrat.foundation.javacomposer.internal.TypeSpecImpl
org.tquadrat.foundation.javacomposer.internal.ClassSpecImpl
- All Implemented Interfaces:
- TypeSpec
@ClassVersion(sourceVersion="$Id: ClassSpecImpl.java 1105 2024-02-28 12:58:46Z tquadrat $")
@API(status=INTERNAL,
     since="0.2.0")
public final class ClassSpecImpl
extends TypeSpecImpl
The implementation of
  
TypeSpec
  for a class.- Author:
- Square,Inc.
- Modified by:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: ClassSpecImpl.java 1105 2024-02-28 12:58:46Z tquadrat $
- Since:
- 0.2.0
- UML Diagram
- 
    
         UML Diagram for "org.tquadrat.foundation.javacomposer.internal.ClassSpecImpl" 
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classThe implementation ofTypeSpec.Builderfor a class.Nested classes/interfaces inherited from class org.tquadrat.foundation.javacomposer.internal.TypeSpecImplTypeSpecImpl.KindNested classes/interfaces inherited from interface org.tquadrat.foundation.javacomposer.TypeSpecTypeSpec.Builder
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final CodeBlockImplThe anonymous type arguments for this type.Fields inherited from class org.tquadrat.foundation.javacomposer.internal.TypeSpecImplNAME_ANONYMOUS_TYPE
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivateClassSpecImpl(ClassSpecImpl type) Creates a dummy type spec for type-resolution in CodeWriter only while emitting the type declaration but before entering the type body.ClassSpecImpl(ClassSpecImpl.BuilderImpl builder) Creates a newTypeClassSpecImplinstance.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the anonymous type arguments.protected final TypeSpecImplCreates a dummy copy of the type spec that is used byTypeSpecImpl.emit(CodeWriter, String, Set)internally.protected final voidemit4Foundation(CodeWriter codeWriter, String enumName, Set<Modifier> implicitModifiers) Emits the type to the given code writer, using the layout as defined by the Foundation library code.protected final voidemit4JavaPoet(CodeWriter codeWriter, String enumName, Set<Modifier> implicitModifiers) Emits the type to the given code writer, using the layout as defined by the original JavaPoet code.final booleanfinal inthashCode()final TypeSpecImpl.BuilderImplReturns a new builder that is initialised with thisTypeSpecinstance.Methods inherited from class org.tquadrat.foundation.javacomposer.internal.TypeSpecImplcompareMethodSpecs, emit, getAnnotations, getEnumConstants, getFactory, getFieldSpecs, getInitializerBlock, getJavadoc, getMethodSpecs, getStaticBlock, getStaticImports, getSuperClass, getSuperInterfaces, getSuppressableWarnings, getTypeVariables, hasModifier, innerClasses, modifiers, name, originatingElements, toString, typeSpecs
- 
Field Details- 
m_AnonymousTypeArgumentsThe anonymous type arguments for this type.
 
- 
- 
Constructor Details- 
ClassSpecImplCreates a newTypeClassSpecImplinstance.- Parameters:
- builder- The builder for this instance.
 
- 
ClassSpecImplCreates a dummy type spec for type-resolution in CodeWriter only while emitting the type declaration but before entering the type body.- Parameters:
- type- The source type.
 
 
- 
- 
Method Details- 
anonymousTypeArgumentsReturns the anonymous type arguments.- Overrides:
- anonymousTypeArgumentsin class- TypeSpecImpl
- Returns:
- An instance of
      Optionalthat holds the anonymous type arguments.
 
- 
createCopyCreates a dummy copy of the type spec that is used byTypeSpecImpl.emit(CodeWriter, String, Set)internally.- Specified by:
- createCopyin class- TypeSpecImpl
- Returns:
- The dummy copy.
 
- 
emit4Foundationprotected final void emit4Foundation(CodeWriter codeWriter, String enumName, Set<Modifier> implicitModifiers) throws UncheckedIOException Emits the type to the given code writer, using the layout as defined by the Foundation library code.- Specified by:
- emit4Foundationin class- TypeSpecImpl
- Parameters:
- codeWriter- The target code writer.
- enumName- The name of the enum; can be- null.
- implicitModifiers- The implicit modifiers.
- Throws:
- UncheckedIOException- A problem occurred when writing to the output target.
 
- 
emit4JavaPoetprotected final void emit4JavaPoet(CodeWriter codeWriter, String enumName, Set<Modifier> implicitModifiers) throws UncheckedIOException Emits the type to the given code writer, using the layout as defined by the original JavaPoet code.- Specified by:
- emit4JavaPoetin class- TypeSpecImpl
- Parameters:
- codeWriter- The target code writer.
- enumName- The name of the enum; can be- null.
- implicitModifiers- The implicit modifiers.
- Throws:
- UncheckedIOException- A problem occurred when writing to the output target.
 
- 
equals- Specified by:
- equalsin interface- TypeSpec
- Specified by:
- equalsin class- TypeSpecImpl
 
- 
hashCode- Specified by:
- hashCodein interface- TypeSpec
- Specified by:
- hashCodein class- TypeSpecImpl
 
- 
toBuilderReturns a new builder that is initialised with thisTypeSpecinstance.- Specified by:
- toBuilderin interface- TypeSpec
- Specified by:
- toBuilderin class- TypeSpecImpl
- Returns:
- The new builder.
 
 
- 
