Nested classes |
class |
ClassPathScanner.ClassNameFilter
A IClassPathFilter that filters and transforms java class names.
|
class |
ClassPathScanner.ExternalClassNameFilter
A ClassNameFilter that rejects inner classes
|
interface |
ClassPathScanner.IClassPathFilter
A filter for classpath entry paths
Patterned after FileFilter
|
Public constructors
ClassPathScanner
public ClassPathScanner ()
Public methods
getClassPath
public static String[] getClassPath ()
Gets the class path from the System Property "java.class.path" and splits
it up into the individual elements.
getClassPathEntriesFromJar
public getClassPathEntriesFromJar (ClassPathScanner.IClassPathFilter filter)
Retrieves set of classpath entries that match given IClassPathFilter
and returns them
with which JAR they come from. Used to validate origin of files.
Parameters |
filter |
ClassPathScanner.IClassPathFilter |
getEntriesFromDir
public getEntriesFromDir (File classPathDir,
ClassPathScanner.IClassPathFilter filter)
Gets the names of all entries contained in given class path directory, that match given
filter
Parameters |
classPathDir |
File |
filter |
ClassPathScanner.IClassPathFilter |
getEntriesFromJar
public getEntriesFromJar (File plainFile,
ClassPathScanner.IClassPathFilter filter)
Gets the names of all entries contained in given jar file, that match given filter
Parameters |
plainFile |
File |
filter |
ClassPathScanner.IClassPathFilter |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."],[],[],null,["# ClassPathScanner\n================\n\n\n`\npublic\n\n\nclass\nClassPathScanner\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.util.ClassPathScanner |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nFinds entries on classpath.\n\nAdapted from vogar.target.ClassPathScanner\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| ### Nested classes ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` class` | [ClassPathScanner.ClassNameFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.ClassNameFilter.html) A [IClassPathFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html) that filters and transforms java class names. |\n| ` class` | [ClassPathScanner.ExternalClassNameFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.ExternalClassNameFilter.html) A [ClassNameFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.ClassNameFilter.html) that rejects inner classes |\n| ` interface` | [ClassPathScanner.IClassPathFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html) A filter for classpath entry paths \u003cbr /\u003e Patterned after [FileFilter](../../../../../../reference/tradefed/java/io/FileFilter.html) \u003cbr /\u003e |\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[ClassPathScanner](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.html#ClassPathScanner())`() ` |\n\n| ### Public methods ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static String[]` | ` `[getClassPath](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.html#getClassPath())`() ` Gets the class path from the System Property \"java.class.path\" and splits it up into the individual elements. |\n| ` ` | ` `[getClassPathEntries](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.html#getClassPathEntries(com.android.tradefed.util.ClassPathScanner.IClassPathFilter))`(`[ClassPathScanner.IClassPathFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html)` filter) ` Retrieves set of classpath entries that match given [IClassPathFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html) |\n| ` ` | ` `[getClassPathEntriesFromJar](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.html#getClassPathEntriesFromJar(com.android.tradefed.util.ClassPathScanner.IClassPathFilter))`(`[ClassPathScanner.IClassPathFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html)` filter) ` Retrieves set of classpath entries that match given [IClassPathFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html) and returns them with which JAR they come from. |\n| ` ` | ` `[getEntriesFromDir](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.html#getEntriesFromDir(File,%20com.android.tradefed.util.ClassPathScanner.IClassPathFilter))`(File classPathDir, `[ClassPathScanner.IClassPathFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html)` filter) ` Gets the names of all entries contained in given class path directory, that match given filter |\n| ` ` | ` `[getEntriesFromJar](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.html#getEntriesFromJar(File,%20com.android.tradefed.util.ClassPathScanner.IClassPathFilter))`(File plainFile, `[ClassPathScanner.IClassPathFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html)` filter) ` Gets the names of all entries contained in given jar file, that match given filter |\n\nPublic constructors\n-------------------\n\n### ClassPathScanner\n\n```\npublic ClassPathScanner ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getClassPath\n\n```\npublic static String[] getClassPath ()\n```\n\nGets the class path from the System Property \"java.class.path\" and splits\nit up into the individual elements.\n\n\u003cbr /\u003e\n\n| Returns ||\n|------------|--------|\n| `String[]` | \u003cbr /\u003e |\n\n### getClassPathEntries\n\n```\npublic getClassPathEntries (../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html filter)\n```\n\nRetrieves set of classpath entries that match given [IClassPathFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html)\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|--------------------------------------------|\n| `filter` | `ClassPathScanner.IClassPathFilter` \u003cbr /\u003e |\n\n| Returns ||\n|---|--------|\n| | \u003cbr /\u003e |\n\n### getClassPathEntriesFromJar\n\n```\npublic getClassPathEntriesFromJar (../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html filter)\n```\n\nRetrieves set of classpath entries that match given [IClassPathFilter](../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html) and returns them\nwith which JAR they come from. Used to validate origin of files.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|--------------------------------------------|\n| `filter` | `ClassPathScanner.IClassPathFilter` \u003cbr /\u003e |\n\n| Returns ||\n|---|--------|\n| | \u003cbr /\u003e |\n\n### getEntriesFromDir\n\n```\npublic getEntriesFromDir (File classPathDir, \n ../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html filter)\n```\n\nGets the names of all entries contained in given class path directory, that match given\nfilter\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------------|--------------------------------------------|\n| `classPathDir` | `File` \u003cbr /\u003e |\n| `filter` | `ClassPathScanner.IClassPathFilter` \u003cbr /\u003e |\n\n| Returns ||\n|---|--------|\n| | \u003cbr /\u003e |\n\n| Throws ||\n|---|-------------|\n| | IOException |\n\n### getEntriesFromJar\n\n```\npublic getEntriesFromJar (File plainFile, \n ../../../../../../reference/tradefed/com/android/tradefed/util/ClassPathScanner.IClassPathFilter.html filter)\n```\n\nGets the names of all entries contained in given jar file, that match given filter\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|--------------------------------------------|\n| `plainFile` | `File` \u003cbr /\u003e |\n| `filter` | `ClassPathScanner.IClassPathFilter` \u003cbr /\u003e |\n\n| Returns ||\n|---|--------|\n| | \u003cbr /\u003e |\n\n| Throws ||\n|---|-------------|\n| | IOException |"]]