Java Code Examples for javax.lang.model.element.ElementKind#equals()
The following examples show how to use
javax.lang.model.element.ElementKind#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Aptools.java From Java-9-Programming-By-Example with MIT License | 5 votes |
private String getKindName(ElementKind kind) { Element element = this.element; while (element != null && element.getKind() != kind) { element = element.getEnclosingElement(); } if (kind.equals(ElementKind.PACKAGE)) { return ((PackageElement) element).getQualifiedName().toString(); } else { return element.getSimpleName().toString(); } }
Example 2
Source File: JaxWsAnnotationProcessor.java From kumuluzee with MIT License | 5 votes |
private void getElementName(Set<String> corsElementNames, Element e) { ElementKind elementKind = e.getKind(); if (elementKind.equals(ElementKind.CLASS)) { corsElementNames.add(e.toString()); } }