Class BeanGenConfig


  • public final class BeanGenConfig
    extends java.lang.Object
    Configuration for the code generator.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​org.joda.beans.gen.BuilderGen> getBuilderGenerators()
      The builder generators.
      java.util.Map<java.lang.String,​java.lang.String> getBuilderTypes()
      The builder types.
      java.util.Map<java.lang.String,​org.joda.beans.gen.CopyGen> getCopyGenerators()
      The copy generators.
      java.lang.String getDefaultStyle()
      Gets the default style to use.
      java.util.Map<java.lang.String,​java.lang.String> getImmutableGetClones()
      The builder types.
      java.util.Map<java.lang.String,​java.lang.String> getImmutableVarArgs()
      The builder varargs code.
      java.lang.String getIndent()
      Gets the indent to use.
      java.util.Set<java.lang.String> getInvalidImmutableTypes()
      The invalid immutable types.
      java.lang.String getPrefix()
      Gets the prefix to use.
      boolean isGeneratedAnno()
      Gets whether to add the generated annotation.
      static BeanGenConfig parse​(java.lang.String resourceLocator)
      Parses the configuration file.
      void setDefaultStyle​(java.lang.String defaultStyle)
      Sets the default style to use.
      void setGeneratedAnno​(boolean generatedAnno)
      Sets whether to add the generated annotation.
      void setIndent​(java.lang.String indent)
      Sets the indent to use.
      void setPrefix​(java.lang.String prefix)
      Sets the prefix to use.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • parse

        public static BeanGenConfig parse​(java.lang.String resourceLocator)
        Parses the configuration file.

        This loads the file as an ini file in this package.

        Parameters:
        resourceLocator - the configuration resource locator, not null
        Returns:
        the configuration
      • getCopyGenerators

        public java.util.Map<java.lang.String,​org.joda.beans.gen.CopyGen> getCopyGenerators()
        The copy generators.
        Returns:
        the generators, not null
      • getBuilderGenerators

        public java.util.Map<java.lang.String,​org.joda.beans.gen.BuilderGen> getBuilderGenerators()
        The builder generators.
        Returns:
        the generators, not null
      • getBuilderTypes

        public java.util.Map<java.lang.String,​java.lang.String> getBuilderTypes()
        The builder types.
        Returns:
        the types, not null
      • getInvalidImmutableTypes

        public java.util.Set<java.lang.String> getInvalidImmutableTypes()
        The invalid immutable types.
        Returns:
        the invalid immutable types, not null
      • getImmutableVarArgs

        public java.util.Map<java.lang.String,​java.lang.String> getImmutableVarArgs()
        The builder varargs code.
        Returns:
        the varargs, not null
      • getImmutableGetClones

        public java.util.Map<java.lang.String,​java.lang.String> getImmutableGetClones()
        The builder types.
        Returns:
        the types, not null
      • getIndent

        public java.lang.String getIndent()
        Gets the indent to use.
        Returns:
        the indent, not null
      • setIndent

        public void setIndent​(java.lang.String indent)
        Sets the indent to use.
        Parameters:
        indent - the indent to use, not null
      • getPrefix

        public java.lang.String getPrefix()
        Gets the prefix to use.
        Returns:
        the prefix, not null
      • setPrefix

        public void setPrefix​(java.lang.String prefix)
        Sets the prefix to use.
        Parameters:
        prefix - the prefix to use, not null
      • getDefaultStyle

        public java.lang.String getDefaultStyle()
        Gets the default style to use.
        Returns:
        the default style, not null
      • setDefaultStyle

        public void setDefaultStyle​(java.lang.String defaultStyle)
        Sets the default style to use.
        Parameters:
        defaultStyle - the default style to use, not null
      • isGeneratedAnno

        public boolean isGeneratedAnno()
        Gets whether to add the generated annotation.
        Returns:
        whether to add the generated annotation, not null
      • setGeneratedAnno

        public void setGeneratedAnno​(boolean generatedAnno)
        Sets whether to add the generated annotation.
        Parameters:
        generatedAnno - whether to add the generated annotation