public static enum TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface extends Enum<TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface> implements TypeWriter.Default.ValidatingClassVisitor.Constraint
TypeWriter.Default.ValidatingClassVisitor.Constraint.Compound, TypeWriter.Default.ValidatingClassVisitor.Constraint.ForAnnotation, TypeWriter.Default.ValidatingClassVisitor.Constraint.ForClass, TypeWriter.Default.ValidatingClassVisitor.Constraint.ForClassFileVersion, TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface, TypeWriter.Default.ValidatingClassVisitor.Constraint.ForPackageType
Enum Constant and Description |
---|
CLASSIC
An interface type with the constrains for the Java versions 5 to 7.
|
JAVA_8
An interface type with the constrains for the Java versions 8+.
|
Modifier and Type | Method and Description |
---|---|
void |
assertAnnotation()
Asserts the legitimacy of an annotation for the instrumented type.
|
void |
assertDefaultValue(String name)
Asserts if a default value is legal for a method.
|
void |
assertField(String name,
boolean isPublic,
boolean isStatic,
boolean isGeneric)
Asserts a field for being valid.
|
void |
assertHandleInConstantPool()
Asserts the capability to store a method handle in the class's constant pool.
|
void |
assertMethod(String name,
boolean isAbstract,
boolean isPublic,
boolean isStatic,
boolean isDefaultValueIncompatible,
boolean isNonStaticNonVirtual,
boolean isGeneric)
Asserts a method for being valid.
|
void |
assertMethodTypeInConstantPool()
Asserts the capability to store a method type constant in the class's constant pool.
|
void |
assertType(int modifier,
boolean definesInterfaces,
boolean isGeneric)
Asserts if the type can legally represent a package description.
|
void |
assertTypeAnnotation()
Asserts the legitimacy of a type annotation for the instrumented type.
|
void |
assertTypeInConstantPool()
Asserts the capability to store a type constant in the class's constant pool.
|
String |
toString() |
static TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface CLASSIC
public static final TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface JAVA_8
public static TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface[] values()
for (TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface c : TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface.values()) System.out.println(c);
public static TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic void assertField(String name, boolean isPublic, boolean isStatic, boolean isGeneric)
TypeWriter.Default.ValidatingClassVisitor.Constraint
assertField
in interface TypeWriter.Default.ValidatingClassVisitor.Constraint
name
- The name of the field.isPublic
- true
if this field is public.isStatic
- true
if this field is static.isGeneric
- true
if this field defines a generic signature.public void assertMethod(String name, boolean isAbstract, boolean isPublic, boolean isStatic, boolean isDefaultValueIncompatible, boolean isNonStaticNonVirtual, boolean isGeneric)
TypeWriter.Default.ValidatingClassVisitor.Constraint
assertMethod
in interface TypeWriter.Default.ValidatingClassVisitor.Constraint
name
- The name of the method.isAbstract
- true
if the method is abstract.isPublic
- true
if this method is public.isStatic
- true
if this method is static.isDefaultValueIncompatible
- true
if a method's signature cannot describe an annotation property method.isNonStaticNonVirtual
- true
if the method is non-virtual and non-static, i.e. a constructor, type initializer or private.isGeneric
- true
if this method defines a generic signature.public void assertAnnotation()
TypeWriter.Default.ValidatingClassVisitor.Constraint
assertAnnotation
in interface TypeWriter.Default.ValidatingClassVisitor.Constraint
public void assertTypeAnnotation()
TypeWriter.Default.ValidatingClassVisitor.Constraint
assertTypeAnnotation
in interface TypeWriter.Default.ValidatingClassVisitor.Constraint
public void assertDefaultValue(String name)
TypeWriter.Default.ValidatingClassVisitor.Constraint
assertDefaultValue
in interface TypeWriter.Default.ValidatingClassVisitor.Constraint
name
- The name of the method.public void assertType(int modifier, boolean definesInterfaces, boolean isGeneric)
TypeWriter.Default.ValidatingClassVisitor.Constraint
assertType
in interface TypeWriter.Default.ValidatingClassVisitor.Constraint
modifier
- The modifier that is to be written to the type.definesInterfaces
- true
if this type implements at least one interface.isGeneric
- true
if this type defines a generic type signature.public void assertTypeInConstantPool()
TypeWriter.Default.ValidatingClassVisitor.Constraint
assertTypeInConstantPool
in interface TypeWriter.Default.ValidatingClassVisitor.Constraint
public void assertMethodTypeInConstantPool()
TypeWriter.Default.ValidatingClassVisitor.Constraint
assertMethodTypeInConstantPool
in interface TypeWriter.Default.ValidatingClassVisitor.Constraint
public void assertHandleInConstantPool()
TypeWriter.Default.ValidatingClassVisitor.Constraint
assertHandleInConstantPool
in interface TypeWriter.Default.ValidatingClassVisitor.Constraint
public String toString()
toString
in class Enum<TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface>
Copyright © 2014–2016. All rights reserved.