Package com.softwaremining.platformutils
Class ClassUtility
java.lang.Object
com.softwaremining.platformutils.ClassUtility
Used Internally by SoftwareMining framework
Responsible for managing load of classes
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
convertProgramCodeToFullClassName
(String programCode, IBaseService owner) for internal use onlystatic String
convertProgramCodeToFullClassName
(String programCode, String newPackageName) static final String
formatClassName
(String cobolName) static final Class
<?> create load an instance of the classstatic final String
getClassName
(Class<?> c) removes the package name from the full path - e.g.static final Object
getInstance
(String className, IBaseService baseService) create an instance of the class namestatic final Object
getInstance
(String className, IBaseService baseService, boolean suppressException) create an instance of the class namestatic final String
getPackageName
(Class<?> c) removes the class name from the full path - e.g.
-
Field Details
-
log
-
-
Constructor Details
-
ClassUtility
public ClassUtility()
-
-
Method Details
-
getInstance
create an instance of the class name- Parameters:
className
-classLoader
-- Returns:
-
getInstance
public static final Object getInstance(String className, IBaseService baseService, boolean suppressException) create an instance of the class name- Parameters:
className
-classLoader
-- Returns:
-
getClass
create load an instance of the class- Parameters:
className
-classLoader
-- Returns:
- - null if no class is found. Throws RuntimeException if no class is found
-
getPackageName
removes the class name from the full path - e.g.
the class com.softwaremining.uitl.ClassUtility will return
com.softwaremining.uitl- Parameters:
c
-- Returns:
-
getClassName
removes the package name from the full path - e.g.
the class com.softwaremining.util.MyClass will return MyClass- Parameters:
fully
- existing class e.g. com.softwaremining.test.MyClass- Returns:
- - string representation of classname without package - e.g. MyClass
-
formatClassName
-
convertProgramCodeToFullClassName
for internal use only- Parameters:
programCode
-owner
-- Returns:
-
convertProgramCodeToFullClassName
-