Package io.odysz.module.xtable
Class XUtil
java.lang.Object
io.odysz.module.xtable.XUtil
- Author:
- odysseus.edu@gmail.com
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
getClassInstance
(XMLTable classRecs, String classField, Object[] constructorParas) Construct instance of class specified in classRecs, return object instantiated with constructorParas.
For ex.:
Object[] p = new Object[2];
p[0] = res;
p[1] = skinid;
skin = (IMetronomeSkin) XUtil.getClassInstance(st, "class", p);
-
Constructor Details
-
XUtil
public XUtil()
-
-
Method Details
-
getClassInstance
public static Object getClassInstance(XMLTable classRecs, String classField, Object[] constructorParas) throws Exception Construct instance of class specified in classRecs, return object instantiated with constructorParas.
For ex.:
Object[] p = new Object[2];
p[0] = res;
p[1] = skinid;
skin = (IMetronomeSkin) XUtil.getClassInstance(st, "class", p);- Parameters:
classRecs
- xtable for class config.classField
- class name field's nameconstructorParas
- paras for constructing new instance.- Returns:
- new class instance
- Throws:
Exception
-