コード例 #1
0
 // ------------------------------------------------------------------------
 //                      p r i v a t e
 // ------------------------------------------------------------------------
 private Object createInstance() throws Exception {
   if (CollectionUtils.isEmpty(_args)) {
     return _toolClass.newInstance();
   } else {
     return ClassLoaderUtils.newInstance(_toolClass, _args.toArray(new Object[_args.size()]));
   }
 }
コード例 #2
0
 // ------------------------------------------------------------------------
 //                      Constructor
 // ------------------------------------------------------------------------
 public VLCToolboxItem(
     final String id, final Class toolClass, final Object[] args, final boolean isSingleton) {
   _id = id;
   _toolClass = toolClass;
   _args = new LinkedList<Object>();
   _singleton = isSingleton;
   if (!CollectionUtils.isEmpty(args)) {
     for (final Object arg : args) {
       _args.add(arg);
     }
   }
 }