Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException { return AnnotationImpl.make(cl, getType(cl), cp, value); }
@Override Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException { return AnnotationImpl.make(cl, getType(cl), cp, value); }
/** * Constructs an annotation-type object representing this annotation. * For example, if this annotation represents <code>@Author</code>, * this method returns an <code>Author</code> object. * * @param cl class loader for loading an annotation type. * @param cp class pool for obtaining class files. * @return the annotation * @throws ClassNotFoundException if the class cannot found. * @throws NoSuchClassError if the class linkage fails. */ public Object toAnnotationType(ClassLoader cl, ClassPool cp) throws ClassNotFoundException, NoSuchClassError { return AnnotationImpl.make(cl, MemberValue.loadClass(cl, getTypeName()), cp, this); }
/** * Constructs an annotation-type object representing this annotation. * For example, if this annotation represents <code>@Author</code>, * this method returns an <code>Author</code> object. * * @param cl class loader for loading an annotation type. * @param cp class pool for obtaining class files. * @return the annotation * @throws ClassNotFoundException if the class cannot found. * @throws NoSuchClassError if the class linkage fails. */ public Object toAnnotationType(ClassLoader cl, ClassPool cp) throws ClassNotFoundException, NoSuchClassError { Class<?> clazz = MemberValue.loadClass(cl, getTypeName()); try { return AnnotationImpl.make(cl, clazz, cp, this); } catch (IllegalArgumentException e) { /* AnnotationImpl.make() may throw this exception * when it fails to make a proxy object for some * reason. */ throw new ClassNotFoundException(clazz.getName(), e); } catch (IllegalAccessError e2) { // also IllegalAccessError throw new ClassNotFoundException(clazz.getName(), e2); } }
private static Object toAnnoType(Annotation anno, ClassPool cp) throws ClassNotFoundException { try { ClassLoader cl = cp.getClassLoader(); return anno.toAnnotationType(cl, cp); } catch (ClassNotFoundException e) { ClassLoader cl2 = cp.getClass().getClassLoader(); try { return anno.toAnnotationType(cl2, cp); } catch (ClassNotFoundException e2){ try { Class clazz = cp.get(anno.getTypeName()).toClass(); return javassist.bytecode.annotation.AnnotationImpl.make( clazz.getClassLoader(), clazz, cp, anno); } catch (Throwable e3) { throw new ClassNotFoundException(anno.getTypeName()); } } } }
private static Object toAnnoType(Annotation anno, ClassPool cp) throws ClassNotFoundException { try { ClassLoader cl = cp.getClassLoader(); return anno.toAnnotationType(cl, cp); } catch (ClassNotFoundException e) { ClassLoader cl2 = cp.getClass().getClassLoader(); try { return anno.toAnnotationType(cl2, cp); } catch (ClassNotFoundException e2){ try { Class<?> clazz = cp.get(anno.getTypeName()).toClass(); return javassist.bytecode.annotation.AnnotationImpl.make( clazz.getClassLoader(), clazz, cp, anno); } catch (Throwable e3) { throw new ClassNotFoundException(anno.getTypeName()); } } } }
Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException { return AnnotationImpl.make(cl, getType(cl), cp, value); }
Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException { return AnnotationImpl.make(cl, getType(cl), cp, value); }
Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException { return AnnotationImpl.make(cl, getType(cl), cp, value); }
Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException { return AnnotationImpl.make(cl, getType(cl), cp, value); }
Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException { return AnnotationImpl.make(cl, getType(cl), cp, value); }
/** * Constructs an annotation-type object representing this annotation. * For example, if this annotation represents <code>@Author</code>, * this method returns an <code>Author</code> object. * * @param cl class loader for loading an annotation type. * @param cp class pool for obtaining class files. * @return the annotation * @throws ClassNotFoundException when the class cannot found */ public Object toAnnotationType(ClassLoader cl, ClassPool cp) throws ClassNotFoundException { return AnnotationImpl.make(cl, MemberValue.loadClass(cl, getTypeName()), cp, this); }
/** * Constructs an annotation-type object representing this annotation. * For example, if this annotation represents <code>@Author</code>, * this method returns an <code>Author</code> object. * * @param cl class loader for loading an annotation type. * @param cp class pool for obtaining class files. * @return the annotation * @throws ClassNotFoundException if the class cannot found. * @throws NoSuchClassError if the class linkage fails. */ public Object toAnnotationType(ClassLoader cl, ClassPool cp) throws ClassNotFoundException, NoSuchClassError { return AnnotationImpl.make(cl, MemberValue.loadClass(cl, getTypeName()), cp, this); }
/** * Constructs an annotation-type object representing this annotation. * For example, if this annotation represents <code>@Author</code>, * this method returns an <code>Author</code> object. * * @param cl class loader for loading an annotation type. * @param cp class pool for obtaining class files. * @return the annotation * @throws ClassNotFoundException if the class cannot found. * @throws NoSuchClassError if the class linkage fails. */ public Object toAnnotationType(ClassLoader cl, ClassPool cp) throws ClassNotFoundException, NoSuchClassError { return AnnotationImpl.make(cl, MemberValue.loadClass(cl, getTypeName()), cp, this); }
/** * Constructs an annotation-type object representing this annotation. * For example, if this annotation represents <code>@Author</code>, * this method returns an <code>Author</code> object. * * @param cl class loader for loading an annotation type. * @param cp class pool for obtaining class files. * @return the annotation * @throws ClassNotFoundException if the class cannot found. * @throws NoSuchClassError if the class linkage fails. */ public Object toAnnotationType(ClassLoader cl, ClassPool cp) throws ClassNotFoundException, NoSuchClassError { return AnnotationImpl.make(cl, MemberValue.loadClass(cl, getTypeName()), cp, this); }
/** * Constructs an annotation-type object representing this annotation. * For example, if this annotation represents <code>@Author</code>, * this method returns an <code>Author</code> object. * * @param cl class loader for loading an annotation type. * @param cp class pool for obtaining class files. * @return the annotation * @throws ClassNotFoundException if the class cannot found. * @throws NoSuchClassError if the class linkage fails. */ public Object toAnnotationType(ClassLoader cl, ClassPool cp) throws ClassNotFoundException, NoSuchClassError { return AnnotationImpl.make(cl, MemberValue.loadClass(cl, getTypeName()), cp, this); }