Class JavaMember
java.lang.Object
uno.anahata.asi.nb.tools.java.JavaType
uno.anahata.asi.nb.tools.java.JavaMember
A lightweight, serializable "keychain" DTO that uniquely identifies a Java
class member (field, method, constructor, etc.). By extending
JavaType,
members that represent types (classes, interfaces, enums) can be used directly
as roots for further exploration.- Author:
- anahata
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ElementKindThe kind of the member (e.g., FIELD, METHOD, CONSTRUCTOR).The set of modifiers for this member (e.g., "public", "static", "default").private StringThe simple name of the member (e.g., "myField", "myMethod"). -
Constructor Summary
ConstructorsConstructorDescriptionJavaMember(org.netbeans.api.java.source.ElementHandle<? extends Element> handle, String fqn, String name, ElementKind kind, URL url, Set<String> modifiers) Constructs a new JavaMember. -
Method Summary
Modifier and TypeMethodDescriptionGets the Javadoc for this type.Gets the source information for this type.Methods inherited from class JavaType
getClassFileObject, getMembers
-
Field Details
-
name
The simple name of the member (e.g., "myField", "myMethod"). -
kind
The kind of the member (e.g., FIELD, METHOD, CONSTRUCTOR). -
modifiers
-
-
Constructor Details
-
JavaMember
public JavaMember(org.netbeans.api.java.source.ElementHandle<? extends Element> handle, String fqn, String name, ElementKind kind, URL url, Set<String> modifiers) Constructs a new JavaMember.- Parameters:
handle- the element handle.fqn- the fully qualified name of the member.name- the member name.kind- the member kind.url- the class file URL.modifiers- the set of modifiers.
-
-
Method Details
-
getSource
Gets the source information for this type.This implementation specializes the source retrieval for class members, returning a
JavaMemberSourcewhich extracts only the member's specific source code fragment from the containing file. -
getJavadoc
Gets the Javadoc for this type.This implementation specializes the Javadoc retrieval for class members, returning a
JavaMemberDocswhich leverages the element handle to fish the member's specific documentation from sources or index.- Overrides:
getJavadocin classJavaType- Returns:
- a JavaTypeDocs object.
- Throws:
Exception- if the Javadoc cannot be retrieved.
-

