站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

Objenesis (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.objenesis
Interface Objenesis

All Known Implementing Classes:
ObjenesisBase, ObjenesisSerializer, ObjenesisStd

public interface Objenesis

Common interface to all kind of Objenesis objects

Author:
Henri Tremblay

Method Summary
 ObjectInstantiator getInstantiatorOf(Class clazz)
          Will pick the best instantiator for the provided class.
 Object newInstance(Class clazz)
          Will create a new object without any constructor being called
 

Method Detail

newInstance

Object newInstance(Class clazz)
Will create a new object without any constructor being called

Parameters:
clazz - Class to instantiate
Returns:
New instance of clazz

getInstantiatorOf

ObjectInstantiator getInstantiatorOf(Class clazz)
Will pick the best instantiator for the provided class. If you need to create a lot of instances from the same class, it is way more efficient to create them from the same ObjectInstantiator than calling newInstance(Class).

Parameters:
clazz - Class to instantiate
Returns:
Instantiator dedicated to the class


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.