Klasse CtSym
The only documentation known seem to be the current implementation of com.sun.tools.javac.platform.JDKPlatformProvider and probably some JDK build tools that construct ct.sym file. Root directories inside the file are somehow related to the Java release number, encoded as single digit or letter (single digits for releases 7 to 9, capital letters for 10 and higher).
If a release directory contains "system-modules" file, it is a flag that this release files are not inside ct.sym file because it is the current release, and jrt file system should be used instead.
All other release directories contain encoded signature (*.sig) files with class stubs for classes in the release.
Some directories contain files that are shared between different releases, exact logic how they are distributed is not known.
Known format versions of ct.sym:
Pre JDK 12:
ct.sym -> 9 -> java/ -> lang/ ct.sym -> 9-modules -> java.base -> module-info.sigFrom JDK 12 onward:
ct.sym -> 9 -> java.base -> java/ -> lang/ ct.sym -> 9 -> java.base -> module-info.sigNotably,
- in JDK 12 modules classes and ordinary classes are located in the same location
- in JDK 12, ordinary classes are found inside their respective modules
Searching a file for a given release in ct.sym means finding Ungültige Eingabe: "&" traversing all possible release related directories and searching for matching path.
-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
byte[]
getFileBytes
(Path path) getFs()
getFullPath
(String releaseCode, String qualifiedSignatureFileName, String moduleName) Retrieves the full path in ct.sym file fro given signature file in given releasegetModuleInJre12plus
(String releaseCode, String qualifiedSignatureFileName) static String
getReleaseCode
(String release) Tries to translate numeric Java version to the corresponding release "code".getRoot()
int
hashCode()
boolean
releaseRoots
(String releaseCode) toString()
-
Felddetails
-
DISABLE_CACHE
public static final boolean DISABLE_CACHE
-
-
Methodendetails
-
getFs
- Gibt zurück:
- never null
-
isJRE12Plus
public boolean isJRE12Plus()- Gibt zurück:
- true if this file is from Java 12+ JRE
-
getRoot
- Gibt zurück:
- never null
-
releaseRoots
- Parameter:
releaseCode
- major JDK version segment as version code (8, 9, A, etc)- Gibt zurück:
- set with all root paths related to given release in ct.sym file
-
getFullPath
Retrieves the full path in ct.sym file fro given signature file in given release12+: something like
java/io/Reader.sig -> /879/java.base/java/io/Reader.sig
before 12:
java/io/Reader.sig -> /8769/java/io/Reader.sig
- Parameter:
releaseCode
- release number encoded (7,8,9,A,B...)qualifiedSignatureFileName
- signature file name (without module)moduleName
-- Gibt zurück:
- corresponding path in ct.sym file system or null if not found
-
getModuleInJre12plus
-
getFileBytes
- Löst aus:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-
getReleaseCode
Tries to translate numeric Java version to the corresponding release "code".- 7, 8 and 9 are just returned "as is"
- versions up from 10 are returned as upper letters starting with "A", so 10 is "A", 11 is "B" and so on.
- Parameter:
release
- release version as number (8, 9, 10, ...)- Gibt zurück:
- the "code" used by ct.sym for given Java version
-