List of usage examples for javax.lang.model.element TypeElement getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.mule.module.extension.internal.capability.xml.schema.AnnotationProcessorUtils.java
/** * Returns the {@link Class} object that is associated to the {@code typeElement} * * @param typeElement a {@link TypeElement} which represents a {@link Class} * @param processingEnvironment the current {@link ProcessingEnvironment} * @param <T> the generic type of the returned {@link Class} * @return the {@link Class} represented by {@code typeElement} *//*from w w w. j a va 2 s. c om*/ public static <T> Class<T> classFor(TypeElement typeElement, ProcessingEnvironment processingEnvironment) { try { return ClassUtils.loadClass( processingEnvironment.getElementUtils().getBinaryName(typeElement).toString(), typeElement.getClass()); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } }