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 of
Trees.BoundAccessExpression.
Use the builder to create immutable instances:
ImmutableTrees.BoundAccessExpression.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeBoundAccessExpression. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableList<Object> private final com.google.common.collect.ImmutableList<Trees.Identifier> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBoundAccessExpression(com.google.common.collect.ImmutableList<Trees.Identifier> path, com.google.common.collect.ImmutableList<Object> accessor) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableList<Object> accessor()builder()Creates a builder forBoundAccessExpression.copyOf(Trees.BoundAccessExpression instance) Creates an immutable copy of aTrees.BoundAccessExpressionvalue.booleanThis 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()withAccessor(Iterable<? extends Object> elements) Copy the current immutable object with elements that replace the content ofaccessor.withAccessor(Object... elements) Copy the current immutable object with elements that replace the content ofaccessor.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.Methods inherited from class org.immutables.generator.processor.Trees.BoundAccessExpression
toString
-
Field Details
-
path
-
accessor
-
-
Constructor Details
-
BoundAccessExpression
private BoundAccessExpression(com.google.common.collect.ImmutableList<Trees.Identifier> path, com.google.common.collect.ImmutableList<Object> accessor)
-
-
Method Details
-
path
- Returns:
- The value of the
pathattribute
-
accessor
- Specified by:
accessorin classTrees.BoundAccessExpression- Returns:
- The value of the
accessorattribute
-
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.BoundAccessExpression 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
-
withAccessor
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
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
This instance is equal to all instances ofBoundAccessExpressionthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:path,accessor. -
copyOf
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
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
-