Package com.perfino.annotation
Enum Class PackageMode
- All Implemented Interfaces:
Serializable
,Comparable<PackageMode>
,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPackages are appended in abbreviated mode.Packages are appended in full.No package information is added, just the simple class name. -
Method Summary
Modifier and TypeMethodDescriptionstatic PackageMode
Returns the enum constant of this class with the specified name.static PackageMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No package information is added, just the simple class name. For example, if the class iscom.mycorp.MyClass
, the string "MyClass" is added.This is the default value and does not have to be specified explicitly
-
ABBREVIATED
Packages are appended in abbreviated mode. Each package name component is replaced by its first character. For example, if the class iscom.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
Packages are appended in full. For example, if the class iscom.mycorp.MyClass
, the fully qualified name "com.mycorp.MyClass" is added.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-