接口 JavaSource

所有已知实现类:
DefaultJavaSource

public interface JavaSource
The root of every JavaModel, even for those based on binary classes.
作者:
Robert Scholte
  • 方法详细资料

    • getURL

      URL getURL()
      返回:
      the URL of the source file
      从以下版本开始:
      1.4
    • getPackage

      JavaPackage getPackage()
      The package of this source or null
      返回:
      the package
    • getImports

      List<String> getImports()
      Retrieve all the import
      返回:
      the imports, never null
    • getClasses

      List<JavaClass> getClasses()
      A List with all direct classes of this source, never null
      返回:
      a list of JavaClasses, never null
    • getCodeBlock

      String getCodeBlock()
      Complete code representation of this source
      返回:
      the code block of this source
    • getClassNamePrefix

      String getClassNamePrefix()
      If there's a package, return the packageName, followed by a dot, otherwise an empty String
      返回:
      the class name prefix, otherwise an empty String
    • getNestedClassByName

      JavaClass getNestedClassByName(String name)
      Try to get the JavaClass child based on its name relative to the package. This doesn't try to resolve it by recursion.
      参数:
      name - the name of the class
      返回:
      the resolved JavaClass, otherwise null
    • getClassByName

      JavaClass getClassByName(String name)
      Try to get any class of this source by name. The name can be both the fully qualified name or just the name of the class.
      参数:
      name - the (fully qualified) name of the class
      返回:
      the matching class, otherwise null
      从以下版本开始:
      2.0
    • getJavaClassLibrary

      ClassLibrary getJavaClassLibrary()
    • getPackageName

      String getPackageName()
      Returns the name of the package or an empty String if there's no package
      返回:
      the package name, otherwise an empty String