protected static interface TypeWriter.Default.ValidatingClassVisitor.Constraint
Modifier and Type | Interface and Description |
---|---|
static class |
TypeWriter.Default.ValidatingClassVisitor.Constraint.Compound
A constraint implementation that summarizes several constraints.
|
static class |
TypeWriter.Default.ValidatingClassVisitor.Constraint.ForAnnotation
Represents the constraint of an annotation type.
|
static class |
TypeWriter.Default.ValidatingClassVisitor.Constraint.ForClass
Represents the constraint of a class type.
|
static class |
TypeWriter.Default.ValidatingClassVisitor.Constraint.ForClassFileVersion
Represents the constraint implied by a class file version.
|
static class |
TypeWriter.Default.ValidatingClassVisitor.Constraint.ForInterface
Represents the constraint of an interface type.
|
static class |
TypeWriter.Default.ValidatingClassVisitor.Constraint.ForPackageType
Represents the constraint of a package type.
|
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 |
assertMethod(String name,
boolean isAbstract,
boolean isPublic,
boolean isStatic,
boolean isDefaultValueIncompatible,
boolean isNonStaticNonVirtual,
boolean isGeneric)
Asserts a method for being valid.
|
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 assertField(String name, boolean isPublic, boolean isStatic, boolean isGeneric)
name
- The name of the field.isPublic
- true
if this field is public.isStatic
- true
if this field is static.isGeneric
- true
if this method defines a generic signature.void assertMethod(String name, boolean isAbstract, boolean isPublic, boolean isStatic, boolean isDefaultValueIncompatible, boolean isNonStaticNonVirtual, boolean isGeneric)
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.void assertAnnotation()
void assertTypeAnnotation()
void assertDefaultValue(String name)
name
- The name of the method.void assertType(int modifier, boolean definesInterfaces, boolean isGeneric)
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.Copyright © 2014–2015. All rights reserved.