public static class TypeWriter.Default.ValidatingClassVisitor.Constraint.ForClassFileVersion extends Object 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| Constructor and Description |
|---|
ForClassFileVersion(ClassFileVersion classFileVersion)
Creates a new constraint for the given class file version.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertAnnotation()
Asserts the legitimacy of an annotation for the instrumented type.
|
void |
assertDefaultMethodCall()
Asserts if it is legal to invoke a default method from a 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 |
assertInvokeDynamic()
Asserts the capability to invoke a method dynamically.
|
void |
assertMethod(String name,
boolean isAbstract,
boolean isPublic,
boolean isPrivate,
boolean isStatic,
boolean isVirtual,
boolean isConstructor,
boolean isDefaultValueIncompatible,
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 |
assertSubRoutine()
Asserts the capability of executing a subroutine.
|
void |
assertType(int modifiers,
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.
|
boolean |
equals(Object other) |
int |
hashCode() |
String |
toString() |
public ForClassFileVersion(ClassFileVersion classFileVersion)
classFileVersion - The enforced class file version.public void assertType(int modifiers,
boolean definesInterfaces,
boolean isGeneric)
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertType in interface TypeWriter.Default.ValidatingClassVisitor.Constraintmodifiers - 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 assertField(String name, boolean isPublic, boolean isStatic, boolean isGeneric)
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertField in interface TypeWriter.Default.ValidatingClassVisitor.Constraintname - 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 isPrivate, boolean isStatic, boolean isVirtual, boolean isConstructor, boolean isDefaultValueIncompatible, boolean isGeneric)
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertMethod in interface TypeWriter.Default.ValidatingClassVisitor.Constraintname - The name of the method.isAbstract - true if the method is abstract.isPublic - true if this method is public.isPrivate - true if this method is private.isStatic - true if this method is static.isVirtual - true if this method is virtual.isConstructor - true if this method is a constructor.isDefaultValueIncompatible - true if a method's signature cannot describe an annotation property method.isGeneric - true if this method defines a generic signature.public void assertAnnotation()
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertAnnotation in interface TypeWriter.Default.ValidatingClassVisitor.Constraintpublic void assertTypeAnnotation()
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertTypeAnnotation in interface TypeWriter.Default.ValidatingClassVisitor.Constraintpublic void assertDefaultValue(String name)
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertDefaultValue in interface TypeWriter.Default.ValidatingClassVisitor.Constraintname - The name of the method.public void assertDefaultMethodCall()
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertDefaultMethodCall in interface TypeWriter.Default.ValidatingClassVisitor.Constraintpublic void assertTypeInConstantPool()
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertTypeInConstantPool in interface TypeWriter.Default.ValidatingClassVisitor.Constraintpublic void assertMethodTypeInConstantPool()
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertMethodTypeInConstantPool in interface TypeWriter.Default.ValidatingClassVisitor.Constraintpublic void assertHandleInConstantPool()
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertHandleInConstantPool in interface TypeWriter.Default.ValidatingClassVisitor.Constraintpublic void assertInvokeDynamic()
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertInvokeDynamic in interface TypeWriter.Default.ValidatingClassVisitor.Constraintpublic void assertSubRoutine()
TypeWriter.Default.ValidatingClassVisitor.ConstraintassertSubRoutine in interface TypeWriter.Default.ValidatingClassVisitor.ConstraintCopyright © 2014–2016. All rights reserved.