Class ImmutableTrees.BoundAccessExpression
- java.lang.Object
-
- org.immutables.generator.processor.Trees.BoundAccessExpression
-
- org.immutables.generator.processor.ImmutableTrees.BoundAccessExpression
-
- All Implemented Interfaces:
Trees.AccessExpression,Trees.Expression,Trees.Synthetic
- Enclosing class:
- ImmutableTrees
@Immutable public static final class ImmutableTrees.BoundAccessExpression extends Trees.BoundAccessExpression
Immutable implementation ofTrees.BoundAccessExpression.Use the builder to create immutable instances:
ImmutableTrees.BoundAccessExpression.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTrees.BoundAccessExpression.BuilderBuilds instances of typeBoundAccessExpression.
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.ImmutableList<java.lang.Object>accessorprivate com.google.common.collect.ImmutableList<Trees.Identifier>path
-
Constructor Summary
Constructors Modifier Constructor Description privateBoundAccessExpression(com.google.common.collect.ImmutableList<Trees.Identifier> path, com.google.common.collect.ImmutableList<java.lang.Object> accessor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableList<java.lang.Object>accessor()static ImmutableTrees.BoundAccessExpression.Builderbuilder()Creates a builder forBoundAccessExpression.static ImmutableTrees.BoundAccessExpressioncopyOf(Trees.BoundAccessExpression instance)Creates an immutable copy of aTrees.BoundAccessExpressionvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofBoundAccessExpressionthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableTrees.BoundAccessExpression another)inthashCode()Computes a hash code from attributes:path,accessor.com.google.common.collect.ImmutableList<Trees.Identifier>path()ImmutableTrees.BoundAccessExpressionwithAccessor(java.lang.Iterable<? extends java.lang.Object> elements)Copy the current immutable object with elements that replace the content ofaccessor.ImmutableTrees.BoundAccessExpressionwithAccessor(java.lang.Object... elements)Copy the current immutable object with elements that replace the content ofaccessor.ImmutableTrees.BoundAccessExpressionwithPath(java.lang.Iterable<? extends Trees.Identifier> elements)Copy the current immutable object with elements that replace the content ofpath.ImmutableTrees.BoundAccessExpressionwithPath(Trees.Identifier... elements)Copy the current immutable object with elements that replace the content ofpath.-
Methods inherited from class org.immutables.generator.processor.Trees.BoundAccessExpression
toString
-
-
-
-
Field Detail
-
path
private final com.google.common.collect.ImmutableList<Trees.Identifier> path
-
accessor
private final com.google.common.collect.ImmutableList<java.lang.Object> accessor
-
-
Constructor Detail
-
BoundAccessExpression
private BoundAccessExpression(com.google.common.collect.ImmutableList<Trees.Identifier> path, com.google.common.collect.ImmutableList<java.lang.Object> accessor)
-
-
Method Detail
-
path
public com.google.common.collect.ImmutableList<Trees.Identifier> path()
- Returns:
- The value of the
pathattribute
-
accessor
public com.google.common.collect.ImmutableList<java.lang.Object> accessor()
- Specified by:
accessorin classTrees.BoundAccessExpression- Returns:
- The value of the
accessorattribute
-
withPath
public final ImmutableTrees.BoundAccessExpression withPath(Trees.Identifier... elements)
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.BoundAccessExpression withPath(java.lang.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
-
withAccessor
public final ImmutableTrees.BoundAccessExpression withAccessor(java.lang.Object... elements)
Copy the current immutable object with elements that replace the content ofaccessor.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAccessor
public final ImmutableTrees.BoundAccessExpression withAccessor(java.lang.Iterable<? extends java.lang.Object> elements)
Copy the current immutable object with elements that replace the content ofaccessor. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of accessor elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofBoundAccessExpressionthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
equalTo
private boolean equalTo(int synthetic, ImmutableTrees.BoundAccessExpression another)
-
hashCode
public int hashCode()
Computes a hash code from attributes:path,accessor.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
copyOf
public static ImmutableTrees.BoundAccessExpression copyOf(Trees.BoundAccessExpression instance)
Creates an immutable copy of aTrees.BoundAccessExpressionvalue. 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 BoundAccessExpression instance
-
builder
public static ImmutableTrees.BoundAccessExpression.Builder builder()
Creates a builder forBoundAccessExpression.ImmutableTrees.BoundAccessExpression.builder() .addPath|addAllPath(org.immutables.generator.processor.Trees.Identifier) //pathelements .addAccessor|addAllAccessor(Object) //accessorelements .build();- Returns:
- A new BoundAccessExpression builder
-
-