Class ImmutableTrees.TransformGenerator

    • Method Detail

      • withDeclaration

        public final ImmutableTrees.TransformGenerator withDeclaration​(Trees.ValueDeclaration value)
        Copy the current immutable object by setting a value for the declaration attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for declaration
        Returns:
        A modified copy of the this object
      • withFrom

        public final ImmutableTrees.TransformGenerator withFrom​(Trees.Expression value)
        Copy the current immutable object by setting a value for the from attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for from
        Returns:
        A modified copy of the this object
      • withTransform

        public final ImmutableTrees.TransformGenerator withTransform​(Trees.Expression value)
        Copy the current immutable object by setting a value for the transform attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for transform
        Returns:
        A modified copy of the this object
      • withVarDeclaration

        public final ImmutableTrees.TransformGenerator withVarDeclaration​(Trees.ValueDeclaration value)
        Copy the current immutable object by setting a value for the varDeclaration attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for varDeclaration
        Returns:
        A modified copy of the this object
      • withCondition

        public final ImmutableTrees.TransformGenerator withCondition​(com.google.common.base.Optional<? extends Trees.Expression> optional)
        Copy the current immutable object by setting an optional value for the condition attribute. A shallow reference equality check on the optional value is used to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for condition
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of TransformGenerator that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: declaration, from, transform, varDeclaration, condition.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value TransformGenerator with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • builder

        public static ImmutableTrees.TransformGenerator.Builder builder()
        Creates a builder for TransformGenerator.
         ImmutableTrees.TransformGenerator.builder()
            .declaration(org.immutables.generator.processor.Trees.ValueDeclaration) // required declaration
            .from(org.immutables.generator.processor.Trees.Expression) // required from
            .transform(org.immutables.generator.processor.Trees.Expression) // required transform
            .varDeclaration(org.immutables.generator.processor.Trees.ValueDeclaration) // required varDeclaration
            .condition(org.immutables.generator.processor.Trees.Expression) // optional condition
            .build();
         
        Returns:
        A new TransformGenerator builder