List of usage examples for com.google.gwt.core.ext.typeinfo JConstructor getEnclosingType
JClassType getEnclosingType();
From source file:org.jboss.errai.codegen.meta.impl.gwt.GWTConstructor.java
License:Apache License
public GWTConstructor(final TypeOracle oracle, final JConstructor c) { this.constructor = c; this.annotations = AnnotationParser.parseAnnotations(c.getAnnotations()); this.declaringClass = GWTClass.newInstance(oracle, c.getEnclosingType()); this.oracle = oracle; }
From source file:org.jboss.errai.ioc.rebind.ioc.codegen.meta.impl.gwt.GWTConstructor.java
License:Apache License
public GWTConstructor(JConstructor c) { this.constructor = c; this.declaringClass = MetaClassFactory.get(c.getEnclosingType()); try {/* w w w .jav a2 s . c om*/ Class<?> cls = Class.forName(c.getEnclosingType().getQualifiedSourceName(), false, Thread.currentThread().getContextClassLoader()); Constructor constr = cls.getConstructor(InjectUtil.jParmToClass(c.getParameters())); annotations = constr.getAnnotations(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } }