Package com.sun.codemodel

Examples of com.sun.codemodel.JCatchBlock


         JBlock staticBlock = cls.init();
         JVar exVar = staticBlock.decl(cm.ref(WebServiceException.class), "e", JExpr._null());
         JVar urlVar = staticBlock.decl(cm.ref(URL.class), "url", JExpr._null());
         JTryBlock tryBlock = staticBlock._try();
         tryBlock.body().assign(urlVar, JExpr._new(cm.ref(URL.class)).arg(JExpr.dotclass(cm.ref(className)).invoke("getResource").arg(".")).arg(wsdlLocation));
         JCatchBlock catchBlock = tryBlock._catch(cm.ref(MalformedURLException.class));
         JVar murlVar = catchBlock.param("murl");
         catchBlock.body().assign(exVar, JExpr._new(cm.ref(WebServiceException.class)).arg(murlVar));
         staticBlock.assign(urlField, urlVar);
         staticBlock.assign(exField, exVar);
     }
View Full Code Here

TOP

Related Classes of com.sun.codemodel.JCatchBlock

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.