|
org.netbeans.api.java/1 1.15 | |||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Java Support APIs | |
---|---|
org.netbeans.api.java.classpath | Representation of Java classpaths, and the ability to find the classpath needed for a particular purpose. |
org.netbeans.api.java.queries | Java-specific queries. |
org.netbeans.spi.java.classpath | SPI permitting new classpaths to be constructed and registered. |
org.netbeans.spi.java.classpath.support | Convenience classes to make it easier to create classpaths. |
org.netbeans.spi.java.queries | Implementations of Java-related queries. |
JavaSupportAPIs The Java Support APIs provides basic facilities for getting or supplying information about Java-language source files. It is based on the query pattern so implementations can be supplied from other modules or projects.
It is possible for the SouceForBinaryQuery provider to specify whether the java module should prefer sources or binaries. In general sources should be preferred for projects where user can make modification. The binaries should be preferred for libraries and platforms where sources may not be complete or correct.
Classpath implementations can now specify which files and folders/packages to include
or exclude. (This could be used for binary classpaths such as COMPILE
but
currently only excludes on SOURCE
paths are honored by Java language features.)
The new API BinaryForSourceQuery was added to allow clients to find out the output (class files) corresponding to source root. The query uses instances of a SPI interface BinaryForSourceQueryImplementation registered in the system lookup to find out the binaries. When no binary is found it uses the default algorithm (SFBQ.findSources(ClassPath.EXECUTE) == sourceRoot)
Added two static methods, findSources(FileObject)
and findUnitTests(FileObject)
,
into UnitTestForSourceQuery
. Added a new SPI interface
MultipleRootsUnitTestForSourceQueryImplementation
which allows to a project type to return
more than one source/test root.
The change was required to allow support of multiple source and test roots.
Added query answering the source level of a Java file.
The API is widely used by all sorts of IDE modules which need to work with Java sources. They can obtain the classpath or boot classpath for a file (if there is one), find out where its source root is, find sources corresponding to bytecode class files, find all sources or classpaths corresponding to open projects, find Javadoc, etc. The SPI is intended mainly for Java platform and library providers, and project type providers, to declare all of this information.
|
The sources for the module are in the NetBeans Mercurial repositories.
Read more about the implementation in the answers to architecture questions.
|
org.netbeans.api.java/1 1.15 | |||||||||
PREV NEXT | FRAMES NO FRAMES |