Class CodeGeneratorOptions

    • Method Detail

      • oneGenerationFolderPerLanguage

        public boolean oneGenerationFolderPerLanguage()
        Specified by:
        oneGenerationFolderPerLanguage in interface ICodeGeneratorOptions
        Returns:
        True if each language code should be written in a separate folder named as the language
      • languages

        public com.google.common.collect.ImmutableList<String> languages()
        Specified by:
        languages in interface ICodeGeneratorOptions
        Returns:
        Languages for which generation should occur
      • withOneGenerationFolderPerLanguage

        public final CodeGeneratorOptions withOneGenerationFolderPerLanguage​(boolean value)
        Copy the current immutable object by setting a value for the oneGenerationFolderPerLanguage attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for oneGenerationFolderPerLanguage
        Returns:
        A modified copy of the this object
      • withLanguages

        public final CodeGeneratorOptions withLanguages​(String... elements)
        Copy the current immutable object with elements that replace the content of languages.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withLanguages

        public final CodeGeneratorOptions withLanguages​(Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of languages. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of languages elements to set
        Returns:
        A modified copy of this object
      • equals

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

        public int hashCode()
        Computes a hash code from attributes: oneGenerationFolderPerLanguage, languages.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static CodeGeneratorOptions copyOf​(ICodeGeneratorOptions instance)
        Creates an immutable copy of a ICodeGeneratorOptions value. 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 CodeGeneratorOptions instance