Class ImmutableTrees.SimpleAccessExpression
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.SimpleAccessExpression
- All Implemented Interfaces:
Trees.AccessExpression,Trees.Expression,Trees.SimpleAccessExpression
- Enclosing class:
ImmutableTrees
@Immutable
public static final class ImmutableTrees.SimpleAccessExpression
extends Object
implements Trees.SimpleAccessExpression
Immutable implementation of
Trees.SimpleAccessExpression.
Use the builder to create immutable instances:
ImmutableTrees.SimpleAccessExpression.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeSimpleAccessExpression. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableList<Trees.Identifier> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSimpleAccessExpression(com.google.common.collect.ImmutableList<Trees.Identifier> path) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forSimpleAccessExpression.copyOf(Trees.SimpleAccessExpression instance) Creates an immutable copy of aTrees.SimpleAccessExpressionvalue.booleanThis instance is equal to all instances ofSimpleAccessExpressionthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.SimpleAccessExpression another) inthashCode()Computes a hash code from attributes:path.com.google.common.collect.ImmutableList<Trees.Identifier> path()toString()Prints the immutable valueSimpleAccessExpressionwith attribute values.withPath(Iterable<? extends Trees.Identifier> elements) Copy the current immutable object with elements that replace the content ofpath.withPath(Trees.Identifier... elements) Copy the current immutable object with elements that replace the content ofpath.
-
Field Details
-
path
-
-
Constructor Details
-
SimpleAccessExpression
-
-
Method Details
-
path
- Specified by:
pathin interfaceTrees.AccessExpression- Returns:
- The value of the
pathattribute
-
withPath
Copy the current immutable object with elements that replace the content ofpath.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPath
public final ImmutableTrees.SimpleAccessExpression withPath(Iterable<? extends Trees.Identifier> elements) Copy the current immutable object with elements that replace the content ofpath. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of path elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofSimpleAccessExpressionthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:path. -
toString
Prints the immutable valueSimpleAccessExpressionwith attribute values. -
copyOf
Creates an immutable copy of aTrees.SimpleAccessExpressionvalue. 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 SimpleAccessExpression instance
-
builder
Creates a builder forSimpleAccessExpression.ImmutableTrees.SimpleAccessExpression.builder() .addPath|addAllPath(org.immutables.generator.processor.Trees.Identifier) //pathelements .build();- Returns:
- A new SimpleAccessExpression builder
-