Package net.bytebuddy.build
Enum AndroidDescriptor.Trivial
- java.lang.Object
-
- java.lang.Enum<AndroidDescriptor.Trivial>
-
- net.bytebuddy.build.AndroidDescriptor.Trivial
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AndroidDescriptor.Trivial>
,AndroidDescriptor
- Enclosing interface:
- AndroidDescriptor
public static enum AndroidDescriptor.Trivial extends java.lang.Enum<AndroidDescriptor.Trivial> implements AndroidDescriptor
A trivial implementation of anAndroidDescriptor
that returns a fixed value.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.build.AndroidDescriptor
AndroidDescriptor.Trivial, AndroidDescriptor.TypeScope
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EXTERNAL
A descriptor that marks all types asAndroidDescriptor.TypeScope.EXTERNAL
.LOCAL
A descriptor that marks all types asAndroidDescriptor.TypeScope.LOCAL
.
-
Field Summary
Fields Modifier and Type Field Description private AndroidDescriptor.TypeScope
typeScope
The type scope to return.
-
Constructor Summary
Constructors Modifier Constructor Description private
Trivial(AndroidDescriptor.TypeScope typeScope)
Creates a new trivial android descriptor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AndroidDescriptor.TypeScope
getTypeScope(TypeDescription typeDescription)
Provides the scope of the passedTypeDescription
instance.static AndroidDescriptor.Trivial
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AndroidDescriptor.Trivial[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LOCAL
public static final AndroidDescriptor.Trivial LOCAL
A descriptor that marks all types asAndroidDescriptor.TypeScope.LOCAL
.
-
EXTERNAL
public static final AndroidDescriptor.Trivial EXTERNAL
A descriptor that marks all types asAndroidDescriptor.TypeScope.EXTERNAL
.
-
-
Field Detail
-
typeScope
private final AndroidDescriptor.TypeScope typeScope
The type scope to return.
-
-
Constructor Detail
-
Trivial
private Trivial(AndroidDescriptor.TypeScope typeScope)
Creates a new trivial android descriptor.- Parameters:
typeScope
- The type scope to return.
-
-
Method Detail
-
values
public static AndroidDescriptor.Trivial[] 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 (AndroidDescriptor.Trivial c : AndroidDescriptor.Trivial.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AndroidDescriptor.Trivial 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 namejava.lang.NullPointerException
- if the argument is null
-
getTypeScope
public AndroidDescriptor.TypeScope getTypeScope(TypeDescription typeDescription)
Provides the scope of the passedTypeDescription
instance.- Specified by:
getTypeScope
in interfaceAndroidDescriptor
- Parameters:
typeDescription
- The type to get the scope for.- Returns:
- a
AndroidDescriptor.TypeScope
describing the type's origin.
-
-