public class PackageUtilities
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
hasPackage(java.lang.String classPath,
java.lang.String packagePath)
Return true if a class of a specified classpath is in a specified package.
|
static boolean |
hasPackage(java.lang.String classPath,
java.lang.String packagePath,
boolean isStrict)
Return true if a class of a specified classpath is in a specified package.
|
public static boolean hasPackage(java.lang.String classPath, java.lang.String packagePath)
my.package.myClass
is in my.package
my.package2.myClass
is not in my.package
classPath
- the class pathpackagePath
- thr package pathpublic static boolean hasPackage(java.lang.String classPath, java.lang.String packagePath, boolean isStrict)
my.package.myClass
is in my.package
my.package2.myClass
is not in my.package
my.package.package3.myClass
is in my.package
my.package.myClass
is in my.package
my.package2.myClass
is not in my.package
my.package.package3.myClass
is not in my.package
classPath
- the class pathpackagePath
- the package pathisStrict
- trur if sub-packages are not consideredCopyright © 2016-2023 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence