Class JavaType

java.lang.Object
uno.anahata.ai.nb.model.java2.JavaType
Direct Known Subclasses:
JavaMember

public class JavaType extends Object
A lightweight, serializable "keychain" DTO that uniquely identifies a Java type. It holds an ElementHandle and a URL to the class file.
  • Constructor Details

    • JavaType

      public JavaType(org.netbeans.modules.java.source.ui.JavaTypeDescription descriptor)
      Constructs a new JavaType from a JavaTypeDescription.
      Parameters:
      descriptor - the type descriptor.
  • Method Details

    • getClassFileObject

      public org.openide.filesystems.FileObject getClassFileObject() throws Exception
      Resolves the URL back to a FileObject representing the class file.
      Returns:
      the FileObject for the class file.
      Throws:
      Exception - if the URL cannot be resolved.
    • getSource

      public JavaTypeSource getSource() throws Exception
      Gets the source information for this type.
      Returns:
      a JavaTypeSource object.
      Throws:
      Exception - if the source cannot be found.
    • getJavadoc

      public JavaTypeDocs getJavadoc() throws Exception
      Gets the Javadoc for this type.
      Returns:
      a JavaTypeDocs object.
      Throws:
      Exception - if the Javadoc cannot be retrieved.
    • getMembers

      public List<JavaMember> getMembers() throws Exception
      Gets the members of this type using a universal, ClassIndex-based approach.
      Returns:
      An unmodifiable list of JavaMembers.
      Throws:
      Exception - if the members cannot be retrieved.