Package hydra.java.syntax
Class ConstructorBody
- java.lang.Object
-
- hydra.java.syntax.ConstructorBody
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ConstructorBody>
public class ConstructorBody extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<ConstructorBody>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Optional<ExplicitConstructorInvocation>invocationstatic NameINVOCATIONName of thehydra.java.syntax.ConstructorBody.invocationfield.java.util.List<BlockStatement>statementsstatic NameSTATEMENTSName of thehydra.java.syntax.ConstructorBody.statementsfield.static NameTYPE_Name of thehydra.java.syntax.ConstructorBodytype.
-
Constructor Summary
Constructors Constructor Description ConstructorBody(Optional<ExplicitConstructorInvocation> invocation, java.util.List<BlockStatement> statements)Constructs an immutableConstructorBody.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ConstructorBody other)booleanequals(java.lang.Object other)inthashCode()ConstructorBodywithInvocation(Optional<ExplicitConstructorInvocation> invocation)Returns a copy of thisConstructorBodywithinvocationreplaced.ConstructorBodywithStatements(java.util.List<BlockStatement> statements)Returns a copy of thisConstructorBodywithstatementsreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.java.syntax.ConstructorBodytype.
-
INVOCATION
public static final Name INVOCATION
Name of thehydra.java.syntax.ConstructorBody.invocationfield.
-
STATEMENTS
public static final Name STATEMENTS
Name of thehydra.java.syntax.ConstructorBody.statementsfield.
-
invocation
public final Optional<ExplicitConstructorInvocation> invocation
-
statements
public final java.util.List<BlockStatement> statements
-
-
Constructor Detail
-
ConstructorBody
public ConstructorBody(Optional<ExplicitConstructorInvocation> invocation, java.util.List<BlockStatement> statements)
Constructs an immutableConstructorBody.
-
-
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(ConstructorBody other)
- Specified by:
compareToin interfacejava.lang.Comparable<ConstructorBody>
-
withInvocation
public ConstructorBody withInvocation(Optional<ExplicitConstructorInvocation> invocation)
Returns a copy of thisConstructorBodywithinvocationreplaced.
-
withStatements
public ConstructorBody withStatements(java.util.List<BlockStatement> statements)
Returns a copy of thisConstructorBodywithstatementsreplaced.
-
-