Package org.hotswap.agent.javassist.bytecode

Examples of org.hotswap.agent.javassist.bytecode.AnnotationsAttribute$Renamer


    /**
     * Check if the file contains annotation.
     */
    protected boolean hasAnnotation(ClassFile cf) throws IOException {

        AnnotationsAttribute visible = (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.visibleTag);
        if (visible != null) {
            for (Annotation ann : visible.getAnnotations()) {
                if (annotation.equals(ann.getTypeName())) {
                    return true;
                }
            }
        }
View Full Code Here


                return true;
        return false;
    }

    public static boolean hasAnnotation(CtClass clazz, String annotationClass) {
        AnnotationsAttribute ainfo = (AnnotationsAttribute) clazz.getClassFile2().
                getAttribute(AnnotationsAttribute.visibleTag);
        if (ainfo != null) {
            for (org.hotswap.agent.javassist.bytecode.annotation.Annotation annot : ainfo.getAnnotations()) {
                if (annot.getTypeName().equals(annotationClass))
                    return true;
            }
        }
        return false;
View Full Code Here

TOP

Related Classes of org.hotswap.agent.javassist.bytecode.AnnotationsAttribute$Renamer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.