Interface JavaSource
- All Known Implementing Classes:
DefaultJavaSource
public interface JavaSource
The root of every JavaModel, even for those based on binary classes.
- Author:
- Robert Scholte
-
Method Summary
Modifier and TypeMethodDescriptiongetClassByName(String name) Try to get any class of this source by name.A List with all direct classes of this source, nevernullIf there's a package, return the packageName, followed by a dot, otherwise an empty StringComplete code representation of this sourceRetrieve all the importgetNestedClassByName(String name) Try to get the JavaClass child based on its name relative to the package.The package of this source ornullReturns the name of the package or an empty String if there's no packagegetURL()
-
Method Details
-
getURL
URL getURL()- Returns:
- the URL of the source file
- Since:
- 1.4
-
getPackage
-
getImports
-
getClasses
-
getCodeBlock
String getCodeBlock()Complete code representation of this source- Returns:
- 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- Returns:
- the class name prefix, otherwise an empty String
-
getNestedClassByName
-
getClassByName
-
getJavaClassLibrary
ClassLibrary getJavaClassLibrary() -
getPackageName
String getPackageName()Returns the name of the package or an empty String if there's no package- Returns:
- the package name, otherwise an empty String
-