Class AbstractExceptions
- java.lang.Object
-
- com.arthenica.smartexception.AbstractExceptions
-
public abstract class AbstractExceptions extends java.lang.ObjectAbstract class that includes common variables and methods for different
Exceptionsimplementations.- Since:
- 0.1.0
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_IGNORE_ALL_CAUSESDefault value for ignoring all causes when stack trace elements are printed or converted to string.static intDEFAULT_MAX_DEPTHDefault max depth used in methods which do not have a maxDepth argument.static booleanDEFAULT_PRINT_PACKAGE_INFORMATIONDefault value for printing package information when stack trace elements are printed or converted to string.static java.util.Set<java.lang.String>groupPackageSetStores global group package names.static booleanignoreAllCausesStores the value of global ignore all causes option.static java.util.Set<java.lang.String>ignoreCausePackageSetStores global ignore cause package names.static java.util.Set<java.lang.String>ignorePackageSetStores global ignore package names.static booleanprintPackageInformationStores the global print package information option.static java.util.Set<java.lang.String>rootPackageSetStores global root package names.static StackTraceElementSerializerstackTraceElementSerializerStores the global stack trace serializer implementation.
-
Constructor Summary
Constructors Constructor Description AbstractExceptions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intappendStackTraceGroupElement(java.lang.StringBuilder stringBuilder, java.lang.String currentGroupPackage, int numberOfElementsInTheCurrentGroup, java.lang.StackTraceElement firstStackTraceElementInTheGroup, boolean printPackageInformation)Appends stack trace group information for the given parameters.static voidclearGroupPackages()Clears previously registered group packages.static voidclearIgnorePackages()Clears previously registered ignore packages.static voidclearRootPackages()Clears previously registered root packages.static booleancontainsCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass)Returns true if the given cause class is found in the exception chain of thethrowable.static booleancontainsCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass, java.lang.String causeMessage)Returns true if the given cause class and cause message is found in the exception chain of thethrowable.static booleancontainsPackage(java.lang.String fullClassName, java.util.Set<java.lang.String> packageSet)Returns true if package of the given class name matches one of package names provided inpackageSet.static java.lang.StringgetAllMessages(java.lang.Throwable throwable)Returns all messages found in the exception chain of thethrowableas a single string.static voidgetAllMessages(java.lang.Throwable throwable, java.lang.StringBuilder messageBuilder)Adds all messages found in the exception chain of thethrowableinto the given message builder.static java.lang.ThrowablegetCause(java.lang.Throwable throwable)Returns the cause of thethrowableby walking through the exception chain.static java.lang.ThrowablegetCause(java.lang.Throwable throwable, int maxDepth)Returns the cause of thethrowableby walking through the exception chain.static java.lang.StringgetContainingPackage(java.lang.String fullClassName, java.util.Set<java.lang.String> packageSet)Checks if one of the package names in thepackageSetmatches the package of the given class name and returns the matching package name.static booleangetIgnoreAllCauses()Returns the value of ignore all causes option.static java.lang.StackTraceElement[]getStackTrace(java.lang.Throwable throwable, int maxDepth)Builds a smart stack trace for the giventhrowableusing elements found until the maxDepth and elements of it.static java.lang.StackTraceElement[]getStackTrace(java.lang.Throwable throwable, java.util.Set<java.lang.String> rootPackageSet, java.util.Set<java.lang.String> ignorePackageSet)Builds a smart stack trace for the giventhrowableusing packages provided and returns elements of it.static StackTraceElementSerializergetStackTraceElementSerializer()Returns the global stack trace serializer implementation which is used to serializeStackTraceElementobjects ingetStackTraceStringmethods.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable)Returns the smart stack trace for the giventhrowable.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable, boolean ignoreAllCauses)Returns the smart stack trace for the giventhrowable.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable, boolean isCause, java.util.Set<java.lang.String> rootPackageSet, java.util.Set<java.lang.String> groupPackageSet, java.util.Set<java.lang.String> ignorePackageSet, int maxDepth, boolean ignoreAllCauses, boolean printPackageInformation)Returns the smart stack trace for the giventhrowableusing parameters provided.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable, int maxDepth)Returns the smart stack trace for the giventhrowableusing elements found until the maxDepth.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable, int maxDepth, boolean ignoreAllCauses)Returns the smart stack trace for the giventhrowableusing elements found until the maxDepth.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable, int maxDepth, boolean ignoreAllCauses, boolean printPackageInformation)Returns the smart stack trace for the giventhrowableusing elements found until the maxDepth.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable, java.lang.String rootPackage)Returns the smart stack trace for the giventhrowableusing root package provided.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable, java.lang.String rootPackage, java.lang.String groupPackage)Returns the smart stack trace for the giventhrowableusing root package provided.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable, java.util.Set<java.lang.String> rootPackageSet, java.util.Set<java.lang.String> groupPackageSet, java.util.Set<java.lang.String> ignorePackageSet)Returns the smart stack trace for the giventhrowableusing packages provided.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable, java.util.Set<java.lang.String> rootPackageSet, java.util.Set<java.lang.String> groupPackageSet, java.util.Set<java.lang.String> ignorePackageSet, boolean ignoreAllCauses)Returns the smart stack trace for the giventhrowableusing packages provided.static java.lang.StringgetStackTraceString(java.lang.Throwable throwable, java.util.Set<java.lang.String> rootPackageSet, java.util.Set<java.lang.String> groupPackageSet, java.util.Set<java.lang.String> ignorePackageSet, boolean ignoreAllCauses, boolean printPackageInformation)Returns the smart stack trace for the giventhrowableusing packages provided.static java.lang.StringgetVersion(PackageLoader packageLoader, java.lang.Class<?> type, java.lang.String packageName)Loads the implementation version for the given package.static booleanisEmpty(java.lang.String value)Checks if given string is empty or not.static booleanisPrintPackageInformation()Returns the value of print package information option.static java.lang.StringlibraryName(java.lang.Class<?> type)Returns the jar file that includes the given class.static java.lang.StringpackageName(java.lang.String className)Returns the package name of this class.static voidregisterGroupPackage(java.lang.String packageString)Registers a new group package.static voidregisterIgnorePackage(java.lang.String packageString, boolean ignoreCauseClasses)Registers a new ignore package.static voidregisterRootPackage(java.lang.String packageString)Registers a new root package.static java.lang.ThrowablesearchCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass)Searches for the given cause class in the exception chain of thethrowable.static java.lang.ThrowablesearchCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass, int maxDepth)Searches for the given cause class in the exception chain of thethrowable.static java.lang.ThrowablesearchCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass, java.lang.String causeMessage)Searches for the given cause class and cause message in the exception chain of thethrowable.static java.lang.ThrowablesearchCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass, java.lang.String causeMessage, int maxDepth)Searches for the given cause class and cause message in the exception chain of thethrowable.static voidsetIgnoreAllCauses(boolean ignoreAllCauses)Sets the value of ignore all causes option.static voidsetPrintPackageInformation(boolean printPackageInformation)Sets the value of print package information option.static voidsetStackTraceElementSerializer(StackTraceElementSerializer stackTraceElementSerializer)Sets the global stack trace serializer implementation which is used to serializeStackTraceElementobjects ingetStackTraceStringmethods.
-
-
-
Field Detail
-
DEFAULT_MAX_DEPTH
public static final int DEFAULT_MAX_DEPTH
Default max depth used in methods which do not have a maxDepth argument.
- See Also:
- Constant Field Values
-
DEFAULT_IGNORE_ALL_CAUSES
public static final boolean DEFAULT_IGNORE_ALL_CAUSES
Default value for ignoring all causes when stack trace elements are printed or converted to string.
- See Also:
- Constant Field Values
-
DEFAULT_PRINT_PACKAGE_INFORMATION
public static final boolean DEFAULT_PRINT_PACKAGE_INFORMATION
Default value for printing package information when stack trace elements are printed or converted to string.
- See Also:
- Constant Field Values
-
rootPackageSet
public static final java.util.Set<java.lang.String> rootPackageSet
Stores global root package names.
-
groupPackageSet
public static final java.util.Set<java.lang.String> groupPackageSet
Stores global group package names.
-
ignorePackageSet
public static final java.util.Set<java.lang.String> ignorePackageSet
Stores global ignore package names.
-
ignoreCausePackageSet
public static final java.util.Set<java.lang.String> ignoreCausePackageSet
Stores global ignore cause package names.
-
ignoreAllCauses
public static boolean ignoreAllCauses
Stores the value of global ignore all causes option.
-
stackTraceElementSerializer
public static StackTraceElementSerializer stackTraceElementSerializer
Stores the global stack trace serializer implementation.
-
printPackageInformation
public static boolean printPackageInformation
Stores the global print package information option.
-
-
Method Detail
-
registerRootPackage
public static void registerRootPackage(java.lang.String packageString)
Registers a new root package.
- Parameters:
packageString- root package name to register
-
clearRootPackages
public static void clearRootPackages()
Clears previously registered root packages.
-
registerGroupPackage
public static void registerGroupPackage(java.lang.String packageString)
Registers a new group package.
- Parameters:
packageString- group package name to register
-
clearGroupPackages
public static void clearGroupPackages()
Clears previously registered group packages.
-
getStackTraceElementSerializer
public static StackTraceElementSerializer getStackTraceElementSerializer()
Returns the global stack trace serializer implementation which is used to serialize
StackTraceElementobjects ingetStackTraceStringmethods.- Returns:
- current stack trace serializer implementation
-
setStackTraceElementSerializer
public static void setStackTraceElementSerializer(StackTraceElementSerializer stackTraceElementSerializer)
Sets the global stack trace serializer implementation which is used to serialize
StackTraceElementobjects ingetStackTraceStringmethods.- Parameters:
stackTraceElementSerializer- new stack trace serializer implementation
-
registerIgnorePackage
public static void registerIgnorePackage(java.lang.String packageString, boolean ignoreCauseClasses)Registers a new ignore package.
- Parameters:
packageString- ignore package name to registerignoreCauseClasses- ignore cause classes from this package too
-
clearIgnorePackages
public static void clearIgnorePackages()
Clears previously registered ignore packages.
-
getIgnoreAllCauses
public static boolean getIgnoreAllCauses()
Returns the value of ignore all causes option.
- Returns:
- the value of global ignore all causes option. If value is true then stack trace elements printed or converted to string will not include causes. If value is false causes will be appended to the stack trace of the main throwable.
-
setIgnoreAllCauses
public static void setIgnoreAllCauses(boolean ignoreAllCauses)
Sets the value of ignore all causes option.
- Parameters:
ignoreAllCauses- new global ignore all causes option. If value is true then stack trace elements printed or converted to string will not include causes. If value is false causes will be appended to the stack trace of the main throwable.
-
isPrintPackageInformation
public static boolean isPrintPackageInformation()
Returns the value of print package information option.
- Returns:
- the value of global print package information option. When this option is true, stack trace elements printed or converted to string will include the name of the jar file that includes the printed class and the version of the jar. If it is false, none of this information is printed
-
setPrintPackageInformation
public static void setPrintPackageInformation(boolean printPackageInformation)
Sets the value of print package information option.
When this option is true, stack trace elements printed or converted to string will include the name of the jar file that includes the printed class and the version of the jar.
Note that for some libraries extracting the jar file and the version may not be possible.
- Parameters:
printPackageInformation- new print package information option.
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable)
Returns the smart stack trace for the given
throwable.This method uses root packages registered by
registerRootPackage(String), group packages registered byregisterGroupPackage(String)and ignore packages registered byregisterIgnorePackage(String, boolean)to build the smart stack trace.- Parameters:
throwable- parent throwable- Returns:
- a string containing the smart stack trace for the given
throwable
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable, boolean ignoreAllCauses)Returns the smart stack trace for the given
throwable.This method uses root packages registered by
registerRootPackage(String), group packages registered byregisterGroupPackage(String)and ignore packages registered byregisterIgnorePackage(String, boolean)to build the smart stack trace.- Parameters:
throwable- parent throwableignoreAllCauses- ignore all causes in the exception chain- Returns:
- a string containing the smart stack trace for the given
throwable
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable, java.util.Set<java.lang.String> rootPackageSet, java.util.Set<java.lang.String> groupPackageSet, java.util.Set<java.lang.String> ignorePackageSet)Returns the smart stack trace for the given
throwableusing packages provided.- Parameters:
throwable- parent throwablerootPackageSet- root packages to use for building the stack tracegroupPackageSet- group packages to use for building the stack traceignorePackageSet- ignore packages to use for building the stack trace- Returns:
- a string containing the smart stack trace for the given
throwable
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable, java.util.Set<java.lang.String> rootPackageSet, java.util.Set<java.lang.String> groupPackageSet, java.util.Set<java.lang.String> ignorePackageSet, boolean ignoreAllCauses)Returns the smart stack trace for the given
throwableusing packages provided.- Parameters:
throwable- parent throwablerootPackageSet- root packages to use for building the stack tracegroupPackageSet- group packages to use for building the stack traceignorePackageSet- ignore packages to use for building the stack traceignoreAllCauses- ignore all causes in the exception chain- Returns:
- a string containing the smart stack trace for the given
throwable
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable, java.util.Set<java.lang.String> rootPackageSet, java.util.Set<java.lang.String> groupPackageSet, java.util.Set<java.lang.String> ignorePackageSet, boolean ignoreAllCauses, boolean printPackageInformation)Returns the smart stack trace for the given
throwableusing packages provided.- Parameters:
throwable- parent throwablerootPackageSet- root packages to use for building the stack tracegroupPackageSet- group packages to use for building the stack traceignorePackageSet- ignore packages to use for building the stack traceignoreAllCauses- ignore all causes in the exception chainprintPackageInformation- print package information- Returns:
- a string containing the smart stack trace for the given
throwable
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable, java.lang.String rootPackage)Returns the smart stack trace for the given
throwableusing root package provided.- Parameters:
throwable- parent throwablerootPackage- root package to use for building the stack trace- Returns:
- a string containing the smart stack trace for the given
throwable
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable, java.lang.String rootPackage, java.lang.String groupPackage)Returns the smart stack trace for the given
throwableusing root package provided.- Parameters:
throwable- parent throwablerootPackage- root package to use for building the stack tracegroupPackage- group package to use for building the stack trace- Returns:
- a string containing the smart stack trace for the given
throwable
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable, int maxDepth)Returns the smart stack trace for the given
throwableusing elements found until the maxDepth.- Parameters:
throwable- parent throwablemaxDepth- max depth in exception chain that will be used- Returns:
- a string containing the smart stack trace for the given
throwable
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable, int maxDepth, boolean ignoreAllCauses)Returns the smart stack trace for the given
throwableusing elements found until the maxDepth.- Parameters:
throwable- parent throwablemaxDepth- max depth in exception chain that will be usedignoreAllCauses- ignore all causes in the exception chain- Returns:
- a string containing the smart stack trace for the given
throwable
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable, int maxDepth, boolean ignoreAllCauses, boolean printPackageInformation)Returns the smart stack trace for the given
throwableusing elements found until the maxDepth.- Parameters:
throwable- parent throwablemaxDepth- max depth in exception chain that will be usedignoreAllCauses- ignore all causes in the exception chainprintPackageInformation- print package information- Returns:
- a string containing the smart stack trace for the given
throwable
-
getStackTraceString
public static java.lang.String getStackTraceString(java.lang.Throwable throwable, boolean isCause, java.util.Set<java.lang.String> rootPackageSet, java.util.Set<java.lang.String> groupPackageSet, java.util.Set<java.lang.String> ignorePackageSet, int maxDepth, boolean ignoreAllCauses, boolean printPackageInformation)Returns the smart stack trace for the given
throwableusing parameters provided.- Parameters:
throwable- parent throwableisCause- throwable is a cause or notrootPackageSet- root packages to use for building the stack tracegroupPackageSet- group packages to use for building the stack traceignorePackageSet- ignore packages to use for building the stack tracemaxDepth- max depth in exception chain that will be usedignoreAllCauses- ignore all causes in the exception chainprintPackageInformation- print package information- Returns:
- a string containing the smart stack trace for the given
throwable
-
appendStackTraceGroupElement
public static int appendStackTraceGroupElement(java.lang.StringBuilder stringBuilder, java.lang.String currentGroupPackage, int numberOfElementsInTheCurrentGroup, java.lang.StackTraceElement firstStackTraceElementInTheGroup, boolean printPackageInformation)Appends stack trace group information for the given parameters.
- Parameters:
stringBuilder- string builder that group stack trace information will be appendedcurrentGroupPackage- package name of the current groupnumberOfElementsInTheCurrentGroup- number of elements in the current groupfirstStackTraceElementInTheGroup- first stack trace element of this groupprintPackageInformation- print package information- Returns:
- new value for the group element count
-
containsPackage
public static boolean containsPackage(java.lang.String fullClassName, java.util.Set<java.lang.String> packageSet)Returns true if package of the given class name matches one of package names provided in
packageSet.- Parameters:
fullClassName- fully qualified class namepackageSet- set containing package names- Returns:
- true if package of the given class name matches one of package names provided in
packageSet, false otherwise
-
getContainingPackage
public static java.lang.String getContainingPackage(java.lang.String fullClassName, java.util.Set<java.lang.String> packageSet)Checks if one of the package names in the
packageSetmatches the package of the given class name and returns the matching package name.- Parameters:
fullClassName- fully qualified class namepackageSet- set containing package names- Returns:
- one of the package names in the
packageSetthat matches the package of the given class name or null if no matching package name is found in thepackageSet
-
getAllMessages
public static java.lang.String getAllMessages(java.lang.Throwable throwable)
Returns all messages found in the exception chain of the
throwableas a single string.- Parameters:
throwable- parent throwable- Returns:
- a string containing all messages found in the exception chain
-
getAllMessages
public static void getAllMessages(java.lang.Throwable throwable, java.lang.StringBuilder messageBuilder)Adds all messages found in the exception chain of the
throwableinto the given message builder.- Parameters:
throwable- parent throwablemessageBuilder- message builder
-
getStackTrace
public static java.lang.StackTraceElement[] getStackTrace(java.lang.Throwable throwable, int maxDepth)Builds a smart stack trace for the given
throwableusing elements found until the maxDepth and elements of it.- Parameters:
throwable- parent throwablemaxDepth- max depth in exception chain that will be returned- Returns:
- an array containing stack trace elements
-
getStackTrace
public static java.lang.StackTraceElement[] getStackTrace(java.lang.Throwable throwable, java.util.Set<java.lang.String> rootPackageSet, java.util.Set<java.lang.String> ignorePackageSet)Builds a smart stack trace for the given
throwableusing packages provided and returns elements of it.- Parameters:
throwable- parent throwablerootPackageSet- root packages to use for building the stack traceignorePackageSet- ignore packages to use for building the stack trace- Returns:
- an array containing stack trace elements
-
containsCause
public static boolean containsCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass)Returns true if the given cause class is found in the exception chain of the
throwable.
Search starts from the
throwableitself and goes through the exception chain up untilDEFAULT_MAX_DEPTH.- Parameters:
throwable- parent throwablecauseClass- class to search for- Returns:
- true if the given cause class is found in the exception chain of the
throwable, false otherwise
-
containsCause
public static boolean containsCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass, java.lang.String causeMessage)Returns true if the given cause class and cause message is found in the exception chain of the
throwable.
Search starts from the
throwableitself and goes through the exception chain up untilDEFAULT_MAX_DEPTH.- Parameters:
throwable- parent throwablecauseClass- class to search forcauseMessage- message to search for- Returns:
- true if the given cause class and cause message is found in the exception chain of the
throwable, false otherwise
-
getCause
public static java.lang.Throwable getCause(java.lang.Throwable throwable)
Returns the cause of the
throwableby walking through the exception chain.- Parameters:
throwable- parent throwable- Returns:
- the cause of the
throwablefound or null ifthrowabledoes not have a cause
-
getCause
public static java.lang.Throwable getCause(java.lang.Throwable throwable, int maxDepth)Returns the cause of the
throwableby walking through the exception chain.
Note that this method walks through the exception chain up to given
maxDepth. If exception chain includes more items thanmaxDepth, cause found atmaxDepthlevel is returned.- Parameters:
throwable- parent throwablemaxDepth- max depth in exception chain that will be searched- Returns:
- the cause of the
throwablefound untilmaxDepthis reached in the exception chain or null ifthrowabledoes not have a cause
-
searchCause
public static java.lang.Throwable searchCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass)Searches for the given cause class in the exception chain of the
throwable.
Search starts from the
throwableitself and goes through the exception chain up untilDEFAULT_MAX_DEPTH.- Parameters:
throwable- parent throwablecauseClass- class to search for- Returns:
- the
throwablefound or null if no class in exception chain matches the given cause class
-
searchCause
public static java.lang.Throwable searchCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass, java.lang.String causeMessage)Searches for the given cause class and cause message in the exception chain of the
throwable.
Search starts from the
throwableitself and goes through the exception chain up untilDEFAULT_MAX_DEPTH.- Parameters:
throwable- parent throwablecauseClass- class to search forcauseMessage- message to search for- Returns:
- the
throwablefound or null if no class in exception chain matches the given cause class and cause message
-
searchCause
public static java.lang.Throwable searchCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass, java.lang.String causeMessage, int maxDepth)Searches for the given cause class and cause message in the exception chain of the
throwable.
Search starts from the
throwableitself and goes through the exception chain up until the givenmaxDepth.- Parameters:
throwable- parent throwablecauseClass- class to search forcauseMessage- message to search formaxDepth- max depth in exception chain that will be searched- Returns:
- the
throwablefound or null if no class in exception chain matches the given cause class and cause message
-
searchCause
public static java.lang.Throwable searchCause(java.lang.Throwable throwable, java.lang.Class<?> causeClass, int maxDepth)Searches for the given cause class in the exception chain of the
throwable.
Search starts from the
throwableitself and goes through the exception chain up until the givenmaxDepth.- Parameters:
throwable- parent throwablecauseClass- class to search formaxDepth- max depth in exception chain that will be searched- Returns:
- the
throwablefound or null if no class in exception chain matches the given cause class
-
isEmpty
public static boolean isEmpty(java.lang.String value)
Checks if given string is empty or not.
- Parameters:
value- string to check- Returns:
- true if given string is null or has zero length after trim(), false otherwise
-
packageName
public static java.lang.String packageName(java.lang.String className)
Returns the package name of this class.
- Parameters:
className- fully qualified class name- Returns:
- name of the package
-
getVersion
public static java.lang.String getVersion(PackageLoader packageLoader, java.lang.Class<?> type, java.lang.String packageName)
Loads the implementation version for the given package.- Parameters:
packageLoader- package loadertype- classpackageName- package- Returns:
- implementation version specified for the given package or null if a version is not specified
-
libraryName
public static java.lang.String libraryName(java.lang.Class<?> type)
Returns the jar file that includes the given class.- Parameters:
type- class- Returns:
- name of the jar file that includes the class or null if jar file information cannot be found
-
-