Class XUtil

java.lang.Object
io.odysz.module.xtable.XUtil

public class XUtil extends Object
Author:
odysseus.edu@gmail.com
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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);

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 name
      constructorParas - paras for constructing new instance.
      Returns:
      new class instance
      Throws:
      Exception