Package net.bytebuddy.dynamic.scaffold
Interface TypeWriter.Default.ValidatingClassVisitor.Constraint
-
- All Known Implementing Classes:
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,TypeWriter.Default.ValidatingClassVisitor.Constraint.ForRecord
- Enclosing class:
- TypeWriter.Default.ValidatingClassVisitor
protected static interface TypeWriter.Default.ValidatingClassVisitor.ConstraintA constraint for members that are legal for a given type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTypeWriter.Default.ValidatingClassVisitor.Constraint.CompoundA constraint implementation that summarizes several constraints.static classTypeWriter.Default.ValidatingClassVisitor.Constraint.ForAnnotationRepresents the constraint of an annotation type.static classTypeWriter.Default.ValidatingClassVisitor.Constraint.ForClassRepresents the constraint of a class type.static classTypeWriter.Default.ValidatingClassVisitor.Constraint.ForClassFileVersionRepresents the constraint implied by a class file version.static classTypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterfaceRepresents the constraint of an interface type.static classTypeWriter.Default.ValidatingClassVisitor.Constraint.ForPackageTypeRepresents the constraint of a package type.static classTypeWriter.Default.ValidatingClassVisitor.Constraint.ForRecordRepresents the constraint of a record type.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidassertAnnotation()Asserts the legitimacy of an annotation for the instrumented type.voidassertDefaultMethodCall()Asserts if it is legal to invoke a default method from a type.voidassertDefaultValue(java.lang.String name)Asserts if a default value is legal for a method.voidassertDynamicValueInConstantPool()Asserts the capability of storing a dynamic value in the constant pool.voidassertField(java.lang.String name, boolean isPublic, boolean isStatic, boolean isFinal, boolean isGeneric)Asserts a field for being valid.voidassertHandleInConstantPool()Asserts the capability to store a method handle in the class's constant pool.voidassertInvokeDynamic()Asserts the capability to invoke a method dynamically.voidassertMethod(java.lang.String name, boolean isAbstract, boolean isPublic, boolean isPrivate, boolean isStatic, boolean isVirtual, boolean isConstructor, boolean isDefaultValueIncompatible, boolean isGeneric)Asserts a method for being valid.voidassertMethodTypeInConstantPool()Asserts the capability to store a method type constant in the class's constant pool.voidassertNestMate()Asserts the capability of storing nest mate information.voidassertPermittedSubclass()Asserts the presence of a permitted subclass.voidassertRecord()Asserts the presence of a record component.voidassertSubRoutine()Asserts the capability of executing a subroutine.voidassertType(int modifier, boolean definesInterfaces, boolean isGeneric)Asserts if the type can legally represent a package description.voidassertTypeAnnotation()Asserts the legitimacy of a type annotation for the instrumented type.voidassertTypeInConstantPool()Asserts the capability to store a type constant in the class's constant pool.
-
-
-
Method Detail
-
assertType
void assertType(int modifier, boolean definesInterfaces, boolean isGeneric)Asserts if the type can legally represent a package description.- Parameters:
modifier- The modifier that is to be written to the type.definesInterfaces-trueif this type implements at least one interface.isGeneric-trueif this type defines a generic type signature.
-
assertField
void assertField(java.lang.String name, boolean isPublic, boolean isStatic, boolean isFinal, boolean isGeneric)Asserts a field for being valid.- Parameters:
name- The name of the field.isPublic-trueif this field is public.isStatic-trueif this field is static.isFinal-trueif this field is final.isGeneric-trueif this field defines a generic signature.
-
assertMethod
void assertMethod(java.lang.String name, boolean isAbstract, boolean isPublic, boolean isPrivate, boolean isStatic, boolean isVirtual, boolean isConstructor, boolean isDefaultValueIncompatible, boolean isGeneric)Asserts a method for being valid.- Parameters:
name- The name of the method.isAbstract-trueif the method is abstract.isPublic-trueif this method is public.isPrivate-trueif this method is private.isStatic-trueif this method is static.isVirtual-trueif this method is virtual.isConstructor-trueif this method is a constructor.isDefaultValueIncompatible-trueif a method's signature cannot describe an annotation property method.isGeneric-trueif this method defines a generic signature.
-
assertAnnotation
void assertAnnotation()
Asserts the legitimacy of an annotation for the instrumented type.
-
assertTypeAnnotation
void assertTypeAnnotation()
Asserts the legitimacy of a type annotation for the instrumented type.
-
assertDefaultValue
void assertDefaultValue(java.lang.String name)
Asserts if a default value is legal for a method.- Parameters:
name- The name of the method.
-
assertDefaultMethodCall
void assertDefaultMethodCall()
Asserts if it is legal to invoke a default method from a type.
-
assertTypeInConstantPool
void assertTypeInConstantPool()
Asserts the capability to store a type constant in the class's constant pool.
-
assertMethodTypeInConstantPool
void assertMethodTypeInConstantPool()
Asserts the capability to store a method type constant in the class's constant pool.
-
assertHandleInConstantPool
void assertHandleInConstantPool()
Asserts the capability to store a method handle in the class's constant pool.
-
assertInvokeDynamic
void assertInvokeDynamic()
Asserts the capability to invoke a method dynamically.
-
assertSubRoutine
void assertSubRoutine()
Asserts the capability of executing a subroutine.
-
assertDynamicValueInConstantPool
void assertDynamicValueInConstantPool()
Asserts the capability of storing a dynamic value in the constant pool.
-
assertNestMate
void assertNestMate()
Asserts the capability of storing nest mate information.
-
assertRecord
void assertRecord()
Asserts the presence of a record component.
-
assertPermittedSubclass
void assertPermittedSubclass()
Asserts the presence of a permitted subclass.
-
-