/** * Return the element type of the specified element. * * @param elt the element * @return the element type or null if none exists */ public static TypeElement getElementTypeOf(Element elt) { ElementKind kind = elt.getKind(); if (kind == ElementKind.CLASS || kind == ElementKind.INTERFACE || kind == ElementKind.ENUM) { return (TypeElement) elt; } Element enclosingElt = elt.getEnclosingElement(); if (enclosingElt != null) { return getElementTypeOf(enclosingElt); } return null; }
matcher.group(1)); if (resolvedElt != null) { TypeElement resolvedTypeElt = Helper.getElementTypeOf(resolvedElt); if (resolvedTypeElt != null) { DeclaredType resolvedType = (DeclaredType) resolvedTypeElt.asType();