Search in sources :

Example 1 with AnnotationsAttribute

use of org.hotswap.agent.javassist.bytecode.AnnotationsAttribute in project HotswapAgent by HotswapProjects.

the class FieldInitLink method hasAnnotation.

// @Override
public boolean hasAnnotation(String annotationName) {
    ClassFile cf = getClassFile2();
    AnnotationsAttribute ainfo = (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.invisibleTag);
    AnnotationsAttribute ainfo2 = (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.visibleTag);
    return hasAnnotationType(annotationName, getClassPool(), ainfo, ainfo2);
}
Also used : ClassFile(org.hotswap.agent.javassist.bytecode.ClassFile) AnnotationsAttribute(org.hotswap.agent.javassist.bytecode.AnnotationsAttribute) ParameterAnnotationsAttribute(org.hotswap.agent.javassist.bytecode.ParameterAnnotationsAttribute)

Example 2 with AnnotationsAttribute

use of org.hotswap.agent.javassist.bytecode.AnnotationsAttribute in project HotswapAgent by HotswapProjects.

the class FieldInitLink method getAnnotation.

public Object getAnnotation(Class clz) throws ClassNotFoundException {
    ClassFile cf = getClassFile2();
    AnnotationsAttribute ainfo = (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.invisibleTag);
    AnnotationsAttribute ainfo2 = (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.visibleTag);
    return getAnnotationType(clz, getClassPool(), ainfo, ainfo2);
}
Also used : ClassFile(org.hotswap.agent.javassist.bytecode.ClassFile) AnnotationsAttribute(org.hotswap.agent.javassist.bytecode.AnnotationsAttribute) ParameterAnnotationsAttribute(org.hotswap.agent.javassist.bytecode.ParameterAnnotationsAttribute)

Example 3 with AnnotationsAttribute

use of org.hotswap.agent.javassist.bytecode.AnnotationsAttribute in project HotswapAgent by HotswapProjects.

the class FieldInitLink method getAnnotations.

private Object[] getAnnotations(boolean ignoreNotFound) throws ClassNotFoundException {
    ClassFile cf = getClassFile2();
    AnnotationsAttribute ainfo = (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.invisibleTag);
    AnnotationsAttribute ainfo2 = (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.visibleTag);
    return toAnnotationType(ignoreNotFound, getClassPool(), ainfo, ainfo2);
}
Also used : ClassFile(org.hotswap.agent.javassist.bytecode.ClassFile) AnnotationsAttribute(org.hotswap.agent.javassist.bytecode.AnnotationsAttribute) ParameterAnnotationsAttribute(org.hotswap.agent.javassist.bytecode.ParameterAnnotationsAttribute)

Aggregations

AnnotationsAttribute (org.hotswap.agent.javassist.bytecode.AnnotationsAttribute)3 ClassFile (org.hotswap.agent.javassist.bytecode.ClassFile)3 ParameterAnnotationsAttribute (org.hotswap.agent.javassist.bytecode.ParameterAnnotationsAttribute)3