Package net.bytebuddy.build
Enum Class AndroidDescriptor.Trivial
- All Implemented Interfaces:
Serializable
,Comparable<AndroidDescriptor.Trivial>
,Constable
,AndroidDescriptor
- Enclosing interface:
AndroidDescriptor
public static enum AndroidDescriptor.Trivial
extends Enum<AndroidDescriptor.Trivial>
implements AndroidDescriptor
A trivial implementation of an
AndroidDescriptor
that returns a fixed value.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.build.AndroidDescriptor
AndroidDescriptor.Trivial, AndroidDescriptor.TypeScope
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA descriptor that marks all types asAndroidDescriptor.TypeScope.EXTERNAL
.A descriptor that marks all types asAndroidDescriptor.TypeScope.LOCAL
. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AndroidDescriptor.TypeScope
The type scope to return. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Trivial
(AndroidDescriptor.TypeScope typeScope) Creates a new trivial android descriptor. -
Method Summary
Modifier and TypeMethodDescriptiongetTypeScope
(TypeDescription typeDescription) Provides the scope of the passedTypeDescription
instance.static AndroidDescriptor.Trivial
Returns the enum constant of this class with the specified name.static AndroidDescriptor.Trivial[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LOCAL
A descriptor that marks all types asAndroidDescriptor.TypeScope.LOCAL
. -
EXTERNAL
A descriptor that marks all types asAndroidDescriptor.TypeScope.EXTERNAL
.
-
-
Field Details
-
typeScope
The type scope to return.
-
-
Constructor Details
-
Trivial
Creates a new trivial android descriptor.- Parameters:
typeScope
- The type scope to return.
-
-
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
-
getTypeScope
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.
-