public PowerList<JavaType> getThrownTypes() { PowerList<JavaType> adapters = Power.list(); for (TypeMirror typeMirror : executable.getThrownTypes()) { adapters.add(getTypeAdapter(typeMirror)); } return adapters; }
@SuppressWarnings("unchecked") protected <S extends AbstractJavaStructure> PowerList<S> findTypeParts( JavaType type, PowerList<S> typeParts) { PowerList<S> ss = Power.list(); for (AbstractJavaStructure typePart : typeParts) { String typeName = typePart.getType().getCanonicalName(); Pattern p = Pattern.compile("^.*\\b(" + typeName + ")\\b.*$"); Matcher m = p.matcher(type.getCanonicalName()); while (m.find()) { ss.add((S) typePart); } } return ss; }