Enum PackageMode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PackageMode>

    public enum PackageMode
    extends java.lang.Enum<PackageMode>
    Specifies the way package names are treated when adding class names to a transaction name. When constructing the naming of a transaction, Part.Type.CLASS and Part.Type.INSTANCE_CLASS add the name of a class to the transaction name. With the Part.packageMode() parameter of the @Part annotation you can control if and how package names should be added.

    The default value is NONE, so if do you not wish to add any package information, you do not have to configure anything.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ABBREVIATED
      Packages are appended in abbreviated mode.
      FULL
      Packages are appended in full.
      NONE
      No package information is added, just the simple class name.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PackageMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static PackageMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NONE

        public static final PackageMode NONE
        No package information is added, just the simple class name. For example, if the class is com.mycorp.MyClass, the string "MyClass" is added.

        This is the default value and does not have to be specified explicitly

      • ABBREVIATED

        public static final PackageMode ABBREVIATED
        Packages are appended in abbreviated mode. Each package name component is replaced by its first characted. For example, if the class is com.mycorp.MyClass, the string "c.m.MyClass" is added.

        This is useful if you want to distinguish several classes with the same name in different packages.

      • FULL

        public static final PackageMode FULL
        Packages are appended in full. For example, if the class is com.mycorp.MyClass, the fully qualified name "com.mycorp.MyClass" is added.
    • Method Detail

      • values

        public static PackageMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PackageMode c : PackageMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PackageMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null