Class InterfaceSpecImpl
java.lang.Object
org.tquadrat.foundation.javacomposer.internal.TypeSpecImpl
org.tquadrat.foundation.javacomposer.internal.InterfaceSpecImpl
- All Implemented Interfaces:
TypeSpec
@ClassVersion(sourceVersion="$Id: InterfaceSpecImpl.java 1064 2023-09-26 20:16:12Z tquadrat $")
@API(status=INTERNAL,
since="0.2.0")
public final class InterfaceSpecImpl
extends TypeSpecImpl
The implementation of
TypeSpec
for an interface.- Author:
- Square,Inc.
- Modified by:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: InterfaceSpecImpl.java 1064 2023-09-26 20:16:12Z tquadrat $
- Since:
- 0.2.0
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.javacomposer.internal.InterfaceSpecImpl"
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe implementation ofTypeSpec.Builderfor an interface.Nested classes/interfaces inherited from class org.tquadrat.foundation.javacomposer.internal.TypeSpecImpl
TypeSpecImpl.KindNested classes/interfaces inherited from interface org.tquadrat.foundation.javacomposer.TypeSpec
TypeSpec.Builder -
Field Summary
Fields inherited from class org.tquadrat.foundation.javacomposer.internal.TypeSpecImpl
NAME_ANONYMOUS_TYPE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCreates a dummy type spec for type-resolution in CodeWriter only while emitting the type declaration but before entering the type body.Creates a newInterfaceSpecImplinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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()Returns a new builder that is initialised with thisTypeSpecinstance.Methods inherited from class org.tquadrat.foundation.javacomposer.internal.TypeSpecImpl
anonymousTypeArguments, compareMethodSpecs, emit, getAnnotations, getEnumConstants, getFactory, getFieldSpecs, getInitializerBlock, getJavadoc, getMethodSpecs, getStaticBlock, getStaticImports, getSuperClass, getSuperInterfaces, getSuppressableWarnings, getTypeVariables, hasModifier, innerClasses, modifiers, name, originatingElements, toString, typeSpecs
-
Constructor Details
-
InterfaceSpecImpl
Creates a newInterfaceSpecImplinstance.- Parameters:
builder- The builder for this instance.
-
InterfaceSpecImpl
Creates 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
-
createCopy
Creates a dummy copy of the type spec that is used byTypeSpecImpl.emit(CodeWriter, String, Set)internally.- Specified by:
createCopyin classTypeSpecImpl- Returns:
- The dummy copy.
-
emit4Foundation
protected 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 classTypeSpecImpl- Parameters:
codeWriter- The target code writer.enumName- The name of the enum; can benull.implicitModifiers- The implicit modifiers.- Throws:
UncheckedIOException- A problem occurred when writing to the output target.
-
emit4JavaPoet
protected 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 classTypeSpecImpl- Parameters:
codeWriter- The target code writer.enumName- The name of the enum; can benull.implicitModifiers- The implicit modifiers.- Throws:
UncheckedIOException- A problem occurred when writing to the output target.
-
equals
- Specified by:
equalsin interfaceTypeSpec- Specified by:
equalsin classTypeSpecImpl
-
hashCode
- Specified by:
hashCodein interfaceTypeSpec- Specified by:
hashCodein classTypeSpecImpl
-
toBuilder
Returns a new builder that is initialised with thisTypeSpecinstance.- Specified by:
toBuilderin interfaceTypeSpec- Specified by:
toBuilderin classTypeSpecImpl- Returns:
- The new builder.
-
