Enum Class ClassTypeConstraint
java.lang.Object
java.lang.Enum<ClassTypeConstraint>
com.cryptomorin.xseries.reflection.constraint.ClassTypeConstraint
- All Implemented Interfaces:
ReflectiveConstraint,Serializable,Comparable<ClassTypeConstraint>,Constable
@Experimental
public enum ClassTypeConstraint
extends Enum<ClassTypeConstraint>
implements ReflectiveConstraint
A constraint that controls what a
- Since:
- 12.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface com.cryptomorin.xseries.reflection.constraint.ReflectiveConstraint
ReflectiveConstraint.Result -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionappliesTo(ReflectiveHandle<?> handle, Object jvm) Whether this constraint can be applied and applies to the given item.category()The category name of this constraint.protected abstract booleanWe won't useXAccessFlagdirectly.toString()static ClassTypeConstraintReturns the enum constant of this class with the specified name.static ClassTypeConstraint[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from interface com.cryptomorin.xseries.reflection.constraint.ReflectiveConstraint
name
-
Enum Constant Details
-
INTERFACE
-
ABSTRACT
-
ENUM
-
RECORD
-
ANNOTATION
-
-
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
-
test
We won't useXAccessFlagdirectly. -
appliesTo
Description copied from interface:ReflectiveConstraintWhether this constraint can be applied and applies to the given item.Usually a
ReflectiveConstraintExceptionshould be thrown if the result is eitherReflectiveConstraint.Result.INCOMPATIBLEorReflectiveConstraint.Result.NOT_MATCHED.- Specified by:
appliesToin interfaceReflectiveConstraint- Parameters:
handle- the reflective handle of the object.jvm- AClass.- Returns:
- Refer to
ReflectiveConstraint.Resultfor details.
-
category
Description copied from interface:ReflectiveConstraintThe category name of this constraint.- Specified by:
categoryin interfaceReflectiveConstraint
-
toString
- Overrides:
toStringin classEnum<ClassTypeConstraint>
-