|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sourceforge.jemm.weaver.transformation.field.FieldClassifier
public class FieldClassifier
Determines if a field on a class is either a jemm created field or specifically using the JEMM API and hence should be ignored.
Nested Class Summary | |
---|---|
static class |
FieldClassifier.Classification
A classification of a CtField as needed by the transformation process. |
Constructor Summary | |
---|---|
FieldClassifier()
Creates a new instance of a FieldClassifier. |
Method Summary | |
---|---|
int |
arrayDimensions(javassist.CtField field)
Returns the dimensions of an array field type. |
FieldClassifier.Classification |
classifySingular(javassist.CtField field)
Classifies the passed in field into a number of different states so that the compiler can determine what to do with a particular field. |
boolean |
isArray(javassist.CtField field)
Returns whether the given field is an array type. |
boolean |
isArrayReferenceTransformable(javassist.CtField field)
If an array field can be converted to a JEMMArrayReference then this returns true, else false. |
boolean |
isEntity(javassist.CtField field)
Returned whether the type referred to by the field is another entity (jemm object). |
boolean |
isJemmCollection(javassist.CtField field)
If the field is a Jemm specific type then this returns true, else false. |
boolean |
isJEMMReferenceTransformable(javassist.CtField field)
If a field can be converted to a JEMMReference then this returns true, else false |
boolean |
isJemmSpecialField(javassist.CtField field)
Is a special field if the field is the shadow object or has the class type of one of the Jemm Collections. |
boolean |
isKnownImmutable(javassist.CtField field)
The wrapper types for the Primitives (Integer, Long, Float etc) are covered by this definition as are the Jemm special immutable types such as JemmDate. |
boolean |
isPrimitive(javassist.CtField field)
Uses the descriptors to determine if the type of the field is a primitive, even if it is an array this will return true if the type of the array is based on a primitive. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FieldClassifier()
Method Detail |
---|
public FieldClassifier.Classification classifySingular(javassist.CtField field) throws javassist.NotFoundException
field
- The field to check
javassist.NotFoundException
public boolean isEntity(javassist.CtField field)
field
- The target field.
public boolean isJemmSpecialField(javassist.CtField field) throws javassist.NotFoundException
field
- The field to check
javassist.NotFoundException
- ClassPool JA exception if the CtClass can't be found.public boolean isJEMMReferenceTransformable(javassist.CtField field) throws javassist.NotFoundException
field
- the field to check
javassist.NotFoundException
public boolean isArrayReferenceTransformable(javassist.CtField field) throws javassist.NotFoundException
field
- The field to check
javassist.NotFoundException
public int arrayDimensions(javassist.CtField field) throws javassist.NotFoundException
field
- The target field.
javassist.NotFoundException
- In an internal error occurs whilst loading the field type.public boolean isArray(javassist.CtField field) throws javassist.NotFoundException
field
- The target field.
javassist.NotFoundException
- In an internal error occurs whilst loading the field type.public boolean isJemmCollection(javassist.CtField field) throws javassist.NotFoundException
field
- The field to check the type of
javassist.NotFoundException
- In an internal error occurs whilst loading the field type.public boolean isPrimitive(javassist.CtField field) throws javassist.NotFoundException
field
- The field to check
javassist.NotFoundException
public boolean isKnownImmutable(javassist.CtField field) throws javassist.NotFoundException
field
- The field to test
javassist.NotFoundException
- In an internal error occurs whilst loading the field type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |