public static synchronized Class<?> loadClass(String className, ClassLoader parent) { Class<?> clazz = null; URL[] urls = URIParserUtil.pathToURLs(getClassPath()); ClassLoader classLoader = newLoader(urls, parent); try { clazz = classLoader.loadClass(className); } catch (Exception e) { Message msg = new Message("FAIL_TO_LOAD_CLASS", LOG, className); throw new ToolException(msg, e); } return clazz; }
private boolean isJAXWSAnnotationExists() { for (Method method : wsMethods) { if (WrapperUtil.isWrapperClassExists(method)) { return true; } WebMethod m = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class); if (m != null) { return true; } WebResult res = AnnotationUtil.getPrivMethodAnnotation(method, WebResult.class); if (res != null) { return true; } } return false; }
public static WebParam getWebParam(Method method, String paraName) { Annotation[][] anno = getPrivParameterAnnotations(method); int count = method.getParameterTypes().length; for (int i = 0; i < count; i++) { for (Annotation ann : anno[i]) { if (ann.annotationType() == WebParam.class) { WebParam webParam = (WebParam)ann; if (paraName.equals(webParam.name())) { return webParam; } } } } return null; }
public Class<?> getServiceClass() { return AnnotationUtil.loadClass((String)context.get(ToolConstants.CFG_CLASSNAME), Thread.currentThread().getContextClassLoader()); }
public static synchronized URLClassLoader getClassLoader(ClassLoader parent) { URL[] urls = URIParserUtil.pathToURLs(getClassPath()); return (URLClassLoader)ClassLoaderUtils.getURLClassLoader(urls, parent); }
public Class<?> getServiceClass() { return AnnotationUtil.loadClass((String)context.get(ToolConstants.CFG_CLASSNAME), Thread .currentThread().getContextClassLoader()); }
public static synchronized URLClassLoader getClassLoader(ClassLoader parent) { URL[] urls = URIParserUtil.pathToURLs(getClassPath()); return (URLClassLoader)ClassLoaderUtils.getURLClassLoader(urls, parent); }
public static synchronized Class<?> loadClass(String className, ClassLoader parent) { Class<?> clazz = null; URL[] urls = URIParserUtil.pathToURLs(getClassPath()); ClassLoader classLoader = newLoader(urls, parent); try { clazz = classLoader.loadClass(className); } catch (Exception e) { Message msg = new Message("FAIL_TO_LOAD_CLASS", LOG, className); throw new ToolException(msg, e); } return clazz; }
public Class<?> getServiceClass() { return AnnotationUtil.loadClass((String)context.get(ToolConstants.CFG_CLASSNAME), Thread .currentThread().getContextClassLoader()); }
private boolean isJAXWSAnnotationExists() { for (Method method : wsMethods) { if (WrapperUtil.isWrapperClassExists(method)) { return true; } WebMethod m = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class); if (m != null) { return true; } WebResult res = AnnotationUtil.getPrivMethodAnnotation(method, WebResult.class); if (res != null) { return true; } } return false; }
public static WebParam getWebParam(Method method, String paraName) { Annotation[][] anno = getPrivParameterAnnotations(method); int count = method.getParameterTypes().length; for (int i = 0; i < count; i++) { for (Annotation ann : anno[i]) { if (ann.annotationType() == WebParam.class) { WebParam webParam = (WebParam)ann; if (paraName.equals(webParam.name())) { return webParam; } } } } return null; }
public Class<?> getServiceClass() { return AnnotationUtil.loadClass((String)context.get(ToolConstants.CFG_CLASSNAME), Thread.currentThread().getContextClassLoader()); }
private boolean isExcluced(Method method) { WebMethod webMethod = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class); return webMethod != null && webMethod.exclude(); }
public boolean faultBeanExists(final Class<?> exceptionClass) { String fb = getWebFaultBean(exceptionClass); if (!StringUtils.isEmpty(fb)) { try { return AnnotationUtil.loadClass(fb, exceptionClass.getClassLoader()) != null; } catch (Exception e) { return false; } } return false; }
private boolean isExcluced(Method method) { WebMethod webMethod = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class); return webMethod != null && webMethod.exclude(); }
public boolean faultBeanExists(final Class<?> exceptionClass) { String fb = getWebFaultBean(exceptionClass); if (!StringUtils.isEmpty(fb)) { try { return AnnotationUtil.loadClass(fb, exceptionClass.getClassLoader()) != null; } catch (Exception e) { return false; } } return false; }
public Class<?> getWrapperClass() { try { return AnnotationUtil.loadClass(getJavaClass().getFullClassName(), getClass().getClassLoader()); } catch (Exception e) { Message msg = new Message("LOAD_WRAPPER_CLASS_FAILED", LOG, getJavaClass().getFullClassName()); LOG.log(Level.FINE, msg.toString()); throw new ToolException(msg); } }
public Class<?> getWrapperClass() { try { return AnnotationUtil.loadClass(getJavaClass().getFullClassName(), getClass().getClassLoader()); } catch (Exception e) { Message msg = new Message("LOAD_WRAPPER_CLASS_FAILED", LOG, getJavaClass().getFullClassName()); LOG.log(Level.FINE, msg.toString()); throw new ToolException(msg); } }