Package com.logicaldoc.core.automation
Class ClassTool
- java.lang.Object
-
- com.logicaldoc.core.automation.ClassTool
-
public class ClassTool extends Object
Utility functions for manipulating classes and resources.- Since:
- 7.5.1
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description ClassTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
newInstance(String className)
Creates a new instance of a class whose constructor does not have parameters
-
-
-
Method Detail
-
newInstance
public Object newInstance(String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException
Creates a new instance of a class whose constructor does not have parameters- Parameters:
className
- name of the class, if the class is inside the package com.logicaldoc you can just avoid the prefix, e.g.: for com.logicaldoc.stamp.automation.StampTool you can simply use stamp.automation.StampTool)- Returns:
- the instantiated object
- Throws:
InstantiationException
- the class does not have a constructor without parametersIllegalAccessException
- the class or the constructor is private or not visibleClassNotFoundException
- you specified an unexisting classSecurityException
- the specified class cannot be instantiated due to security constraintsNoSuchMethodException
- no public constructor without parametersInvocationTargetException
- the constructor raised an exceptionIllegalArgumentException
- no public constructor without parameters
-
-