|
org.netbeans.modules.java.source 0.13.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.java.source.ElementUtilities
public final class ElementUtilities
Nested Class Summary | |
---|---|
static interface |
ElementUtilities.ElementAcceptor
|
Constructor Summary | |
---|---|
ElementUtilities(JavacTask task)
|
Method Summary | |
---|---|
boolean |
alreadyDefinedIn(CharSequence name,
ExecutableType method,
TypeElement enclClass)
Returns true if a method specified by name and type is defined in a class type. |
boolean |
assigned(Element e,
Element parent)
Returns true if the element is assigned by a specified tree. |
Element |
elementFor(com.sun.javadoc.Doc doc)
|
TypeElement |
enclosingTypeElement(Element element)
Returns the TypeElement which encloses the specified element. |
static String |
getBinaryName(TypeElement element)
Returns a binary name of a type. |
CharSequence |
getFullName(Element element)
Returns the fully qualified name of this element, which is its simple name with its owner(s) prepended. |
Iterable<? extends TypeElement> |
getGlobalTypes(ElementUtilities.ElementAcceptor acceptor)
|
Element |
getImplementationOf(ExecutableElement method,
TypeElement origin)
Returns the implementation of a method in class origin; null if none exists. |
Iterable<? extends Element> |
getLocalMembersAndVars(Scope scope,
ElementUtilities.ElementAcceptor acceptor)
|
Iterable<? extends Element> |
getLocalVars(Scope scope,
ElementUtilities.ElementAcceptor acceptor)
|
Iterable<? extends Element> |
getMembers(TypeMirror type,
ElementUtilities.ElementAcceptor acceptor)
|
ExecutableElement |
getOverriddenMethod(ExecutableElement method)
Returns the parent method which the specified method overrides, or null if the method does not override a parent class method. |
boolean |
implementsMethod(ExecutableElement element)
Returns true if this element represents a method which implements a method in an interface the parent class implements. |
boolean |
isLocal(Element element)
Returns true if the element is declared (directly or indirectly) local to a method or variable initializer. |
boolean |
isMemberOf(Element e,
TypeElement type)
Returns true if a type element has the specified element as a member. |
boolean |
isSynthetic(Element element)
Returns true if the given element is syntetic. |
com.sun.javadoc.Doc |
javaDocFor(Element element)
|
TypeElement |
outermostTypeElement(Element element)
The outermost TypeElement which indirectly encloses this element. |
boolean |
overridesMethod(ExecutableElement element)
Returns true if this element represents a method which overrides a method in one of its superclasses. |
PackageElement |
packageElement(Element element)
The package element which indirectly encloses this element.. |
boolean |
parameter(Element e,
Element parent)
Returns true if the element is a parameter for a specified method. |
boolean |
referenced(Element e,
Element parent)
Returns true if the specified element is referenced by a specified tree. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ElementUtilities(JavacTask task)
Method Detail |
---|
public TypeElement enclosingTypeElement(Element element)
public TypeElement outermostTypeElement(Element element)
public PackageElement packageElement(Element element)
public Element getImplementationOf(ExecutableElement method, TypeElement origin)
public boolean isSynthetic(Element element)
element
- to check
public boolean overridesMethod(ExecutableElement element)
public static String getBinaryName(TypeElement element) throws IllegalArgumentException
element
- for which the binary name should be returned
IllegalArgumentException
- when the element is not a javac elementpublic com.sun.javadoc.Doc javaDocFor(Element element)
public Element elementFor(com.sun.javadoc.Doc doc)
public Iterable<? extends Element> getMembers(TypeMirror type, ElementUtilities.ElementAcceptor acceptor)
public Iterable<? extends Element> getLocalMembersAndVars(Scope scope, ElementUtilities.ElementAcceptor acceptor)
public Iterable<? extends Element> getLocalVars(Scope scope, ElementUtilities.ElementAcceptor acceptor)
public Iterable<? extends TypeElement> getGlobalTypes(ElementUtilities.ElementAcceptor acceptor)
public boolean referenced(Element e, Element parent)
public boolean assigned(Element e, Element parent)
public boolean parameter(Element e, Element parent)
public boolean isLocal(Element element)
public boolean alreadyDefinedIn(CharSequence name, ExecutableType method, TypeElement enclClass)
public boolean isMemberOf(Element e, TypeElement type)
public CharSequence getFullName(Element element)
public ExecutableElement getOverriddenMethod(ExecutableElement method)
public boolean implementsMethod(ExecutableElement element)
|
org.netbeans.modules.java.source 0.13.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |