Package hydra.java.syntax
Class RecordDeclaration
- java.lang.Object
-
- hydra.java.syntax.RecordDeclaration
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<RecordDeclaration>
public class RecordDeclaration extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<RecordDeclaration>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description RecordBodybodystatic NameBODYName of thehydra.java.syntax.RecordDeclaration.bodyfield.RecordHeaderheaderstatic NameHEADERName of thehydra.java.syntax.RecordDeclaration.headerfield.TypeIdentifieridentifierstatic NameIDENTIFIERName of thehydra.java.syntax.RecordDeclaration.identifierfield.static NameIMPLEMENTSName of thehydra.java.syntax.RecordDeclaration.implementsfield.java.util.List<InterfaceType>implements_java.util.List<ClassModifier>modifiersstatic NameMODIFIERSName of thehydra.java.syntax.RecordDeclaration.modifiersfield.java.util.List<TypeParameter>parametersstatic NamePARAMETERSName of thehydra.java.syntax.RecordDeclaration.parametersfield.static NameTYPE_Name of thehydra.java.syntax.RecordDeclarationtype.
-
Constructor Summary
Constructors Constructor Description RecordDeclaration(java.util.List<ClassModifier> modifiers, TypeIdentifier identifier, java.util.List<TypeParameter> parameters, RecordHeader header, java.util.List<InterfaceType> implements_, RecordBody body)Constructs an immutableRecordDeclaration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(RecordDeclaration other)booleanequals(java.lang.Object other)inthashCode()RecordDeclarationwithBody(RecordBody body)Returns a copy of thisRecordDeclarationwithbodyreplaced.RecordDeclarationwithHeader(RecordHeader header)Returns a copy of thisRecordDeclarationwithheaderreplaced.RecordDeclarationwithIdentifier(TypeIdentifier identifier)Returns a copy of thisRecordDeclarationwithidentifierreplaced.RecordDeclarationwithImplements(java.util.List<InterfaceType> implements_)Returns a copy of thisRecordDeclarationwithimplementsreplaced.RecordDeclarationwithModifiers(java.util.List<ClassModifier> modifiers)Returns a copy of thisRecordDeclarationwithmodifiersreplaced.RecordDeclarationwithParameters(java.util.List<TypeParameter> parameters)Returns a copy of thisRecordDeclarationwithparametersreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.java.syntax.RecordDeclarationtype.
-
MODIFIERS
public static final Name MODIFIERS
Name of thehydra.java.syntax.RecordDeclaration.modifiersfield.
-
IDENTIFIER
public static final Name IDENTIFIER
Name of thehydra.java.syntax.RecordDeclaration.identifierfield.
-
PARAMETERS
public static final Name PARAMETERS
Name of thehydra.java.syntax.RecordDeclaration.parametersfield.
-
HEADER
public static final Name HEADER
Name of thehydra.java.syntax.RecordDeclaration.headerfield.
-
IMPLEMENTS
public static final Name IMPLEMENTS
Name of thehydra.java.syntax.RecordDeclaration.implementsfield.
-
BODY
public static final Name BODY
Name of thehydra.java.syntax.RecordDeclaration.bodyfield.
-
modifiers
public final java.util.List<ClassModifier> modifiers
-
identifier
public final TypeIdentifier identifier
-
parameters
public final java.util.List<TypeParameter> parameters
-
header
public final RecordHeader header
-
implements_
public final java.util.List<InterfaceType> implements_
-
body
public final RecordBody body
-
-
Constructor Detail
-
RecordDeclaration
public RecordDeclaration(java.util.List<ClassModifier> modifiers, TypeIdentifier identifier, java.util.List<TypeParameter> parameters, RecordHeader header, java.util.List<InterfaceType> implements_, RecordBody body)
Constructs an immutableRecordDeclaration.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(RecordDeclaration other)
- Specified by:
compareToin interfacejava.lang.Comparable<RecordDeclaration>
-
withModifiers
public RecordDeclaration withModifiers(java.util.List<ClassModifier> modifiers)
Returns a copy of thisRecordDeclarationwithmodifiersreplaced.
-
withIdentifier
public RecordDeclaration withIdentifier(TypeIdentifier identifier)
Returns a copy of thisRecordDeclarationwithidentifierreplaced.
-
withParameters
public RecordDeclaration withParameters(java.util.List<TypeParameter> parameters)
Returns a copy of thisRecordDeclarationwithparametersreplaced.
-
withHeader
public RecordDeclaration withHeader(RecordHeader header)
Returns a copy of thisRecordDeclarationwithheaderreplaced.
-
withImplements
public RecordDeclaration withImplements(java.util.List<InterfaceType> implements_)
Returns a copy of thisRecordDeclarationwithimplementsreplaced.
-
withBody
public RecordDeclaration withBody(RecordBody body)
Returns a copy of thisRecordDeclarationwithbodyreplaced.
-
-