Class ImmutableTrees.InvokableDeclaration

    • Constructor Detail

    • Method Detail

      • withName

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

        public final ImmutableTrees.InvokableDeclaration withParameters​(java.lang.Iterable<? extends Trees.Parameter> elements)
        Copy the current immutable object with elements that replace the content of parameters. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of parameters elements to set
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of InvokableDeclaration 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: name, parameters.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableTrees.InvokableDeclaration.Builder builder()
        Creates a builder for InvokableDeclaration.
         ImmutableTrees.InvokableDeclaration.builder()
            .name(org.immutables.generator.processor.Trees.Identifier) // required name
            .addParameters|addAllParameters(org.immutables.generator.processor.Trees.Parameter) // parameters elements
            .build();
         
        Returns:
        A new InvokableDeclaration builder