public TypeInfo getTypeInfo(ResourceContext resource) throws Throwable { return configurator.getTypeInfo(resource.getClassName(), resource.getClassLoader()); } }
public TypeInfo getTypeInfo(ResourceContext resource) throws Throwable { InputStream stream = resource.getInputStream(); if (stream == null) throw new IllegalArgumentException("Null stream: " + resource); try { CtClass ctClass = getClassPool(resource.getClassLoader()).makeClassIfNew(stream); return JavassistUtil.toTypeInfo(ctClass); } finally { stream.close(); } } }