Search in sources :

Example 1 with FieldInfo

use of javassist.bytecode.FieldInfo in project audit4j-core by audit4j.

the class AnnotationDB method scanFields.

protected void scanFields(ClassFile cf) {
    List<ClassFile> fields = cf.getFields();
    if (fields == null)
        return;
    for (Object obj : fields) {
        FieldInfo field = (FieldInfo) obj;
        AnnotationsAttribute visible = (AnnotationsAttribute) field.getAttribute(AnnotationsAttribute.visibleTag);
        AnnotationsAttribute invisible = (AnnotationsAttribute) field.getAttribute(AnnotationsAttribute.invisibleTag);
        if (visible != null)
            populate(visible.getAnnotations(), cf.getName());
        if (invisible != null)
            populate(invisible.getAnnotations(), cf.getName());
    }
}
Also used : ClassFile(javassist.bytecode.ClassFile) ParameterAnnotationsAttribute(javassist.bytecode.ParameterAnnotationsAttribute) AnnotationsAttribute(javassist.bytecode.AnnotationsAttribute) FieldInfo(javassist.bytecode.FieldInfo)

Aggregations

AnnotationsAttribute (javassist.bytecode.AnnotationsAttribute)1 ClassFile (javassist.bytecode.ClassFile)1 FieldInfo (javassist.bytecode.FieldInfo)1 ParameterAnnotationsAttribute (javassist.bytecode.ParameterAnnotationsAttribute)1