Package | Description |
---|---|
org.netbeans.api.java.source |
Permits inspection and modification of the structure of Java sources.
|
org.netbeans.api.java.source.support |
Modifier and Type | Method and Description |
---|---|
static <T extends Element> |
ElementHandle.create(T element)
Factory method for creating
ElementHandle . |
static ElementHandle<ModuleElement> |
ElementHandle.createModuleElementHandle(String moduleName)
Creates an
ElementHandle representing a ModuleElement . |
static ElementHandle<PackageElement> |
ElementHandle.createPackageElementHandle(String packageName)
Creates an
ElementHandle representing a PackageElement . |
static ElementHandle<TypeElement> |
ElementHandle.createTypeElementHandle(ElementKind kind,
String binaryName)
Creates an
ElementHandle representing a TypeElement . |
static ElementHandle<? extends TypeElement> |
ElementHandle.from(TypeMirrorHandle<? extends DeclaredType> typeMirrorHandle)
|
ElementHandle |
TreePathHandle.getElementHandle()
returns
ElemntHandle corresponding to this TreePathHandle |
ElementHandle<TypeElement> |
ClassIndex.Symbols.getEnclosingType()
The type that contains some symbols matching the required criterie.
|
ElementHandle<ModuleElement> |
TypesEvent.getModule()
Returns the affected module in case of module-info change.
|
Modifier and Type | Method and Description |
---|---|
static TreePathHandle |
TreePathHandle.from(ElementHandle<?> handle,
ClasspathInfo cpInfo)
Constructs a
TreePathHandle that corresponds to the given ElementHandle . |
Set<ElementHandle<TypeElement>> |
ClassIndex.getElements(ElementHandle<TypeElement> element,
Set<ClassIndex.SearchKind> searchKind,
Set<? extends ClassIndex.SearchScopeType> scope)
Returns a set of
ElementHandle s containing reference(s) to given type element. |
Set<ElementHandle<TypeElement>> |
ClassIndex.getElementsForPackage(ElementHandle<PackageElement> element,
Set<ClassIndex.SearchKind> searchKind,
Set<? extends ClassIndex.SearchScopeType> scope)
Returns a set of
ElementHandle s containing reference(s) to given package element. |
static FileObject |
SourceUtils.getFile(ElementHandle<? extends Element> handle,
ClasspathInfo cpInfo)
Returns a
FileObject of the source file in which the handle is declared. |
static String[] |
SourceUtils.getJVMSignature(ElementHandle<?> handle)
Returns an array containing the JVM signature of the
ElementHandle . |
Set<FileObject> |
ClassIndex.getResources(ElementHandle<TypeElement> element,
Set<ClassIndex.SearchKind> searchKind,
Set<? extends ClassIndex.SearchScopeType> scope)
Returns a set of source files containing reference(s) to given type element.
|
Set<FileObject> |
ClassIndex.getResources(ElementHandle<TypeElement> element,
Set<ClassIndex.SearchKind> searchKind,
Set<? extends ClassIndex.SearchScopeType> scope,
Set<ClassIndex.ResourceType> resourceType)
Returns a set of source or binary files containing reference(s) to given type element.
|
Set<FileObject> |
ClassIndex.getResourcesForPackage(ElementHandle<PackageElement> element,
Set<ClassIndex.SearchKind> searchKind,
Set<? extends ClassIndex.SearchScopeType> scope)
Returns a set of source files containing reference(s) to given package element.
|
static void |
ScanUtils.signalIncompleteData(CompilationInfo ci,
ElementHandle handle)
Aborts the user task and calls it again when parsing finishes, if a typename is not available.
|
boolean |
ElementHandle.signatureEquals(ElementHandle<? extends Element> handle)
Tests if the handle has the same signature as the parameter.
|
Modifier and Type | Method and Description |
---|---|
ElementHandle<TypeElement> |
ProfileSupport.Violation.getUsedType()
Returns the type from higher
SourceLevelQuery.Profile causing the violation. |
Modifier and Type | Method and Description |
---|---|
int |
ReferencesCount.getPackageReferenceCount(ElementHandle<? extends PackageElement> pkg)
Returns an estimate of a number of classes on given source path (source root) which are
using given package.
|
int |
ReferencesCount.getTypeReferenceCount(ElementHandle<? extends TypeElement> type)
Returns an estimate of a number of classes on given source path (source root) which are
using given type.
|