/** * This will create a synthetic annotation using the provided * interface. All attributes for the provided annotation will * have their default values. * * @param loader this is the class loader to load the annotation * @param label this is the annotation interface to be used * @param attribute determines if a map has an attribute key * * @return this returns the synthetic annotation to be used */ private Annotation getInstance(ClassLoader loader, Class label, boolean attribute) throws Exception { AnnotationHandler handler = new AnnotationHandler(label, required, attribute); Class[] list = new Class[] {label}; return (Annotation) Proxy.newProxyInstance(loader, list, handler); }
/** * This will create a synthetic annotation using the provided * interface. All attributes for the provided annotation will * have their default values. * * @param loader this is the class loader to load the annotation * @param label this is the annotation interface to be used * @param attribute determines if a map has an attribute key * * @return this returns the synthetic annotation to be used */ private Annotation getInstance(ClassLoader loader, Class label, boolean attribute) throws Exception { AnnotationHandler handler = new AnnotationHandler(label, required, attribute); Class[] list = new Class[] {label}; return (Annotation) Proxy.newProxyInstance(loader, list, handler); }
/** * This will create a synthetic annotation using the provided * interface. All attributes for the provided annotation will * have their default values. * * @param loader this is the class loader to load the annotation * @param label this is the annotation interface to be used * @param attribute determines if a map has an attribute key * * @return this returns the synthetic annotation to be used */ private Annotation getInstance(ClassLoader loader, Class label, boolean attribute) throws Exception { AnnotationHandler handler = new AnnotationHandler(label, required, attribute); Class[] list = new Class[] {label}; return (Annotation) Proxy.newProxyInstance(loader, list, handler); }