![JAR search and dependency download from the Maven repository](/logo.png)
panda.bean.handler.AbstractJavaBeanHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-core Show documentation
Show all versions of panda-core Show documentation
Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.
package panda.bean.handler;
import java.lang.reflect.Type;
import panda.bean.Beans;
import panda.lang.reflect.Types;
/**
*
* @param class type
*/
public abstract class AbstractJavaBeanHandler extends AbstractBeanHandler {
/**
* Constructor
* @param beans bean handler factory
* @param type bean type
*/
public AbstractJavaBeanHandler(Beans beans, Type type) {
super(beans, type);
}
/**
* create bean object
* @return bean instance
*/
public T createObject() {
return Types.born(Types.getDefaultImplType(type));
}
// /**
// * @param propertyName property name
// * @return NoSuchPropertyException
// */
// protected RuntimeException noSuchPropertyException(String propertyName) {
// return new NoSuchPropertyException("Unknown property: " + propertyName + " [" + type + "].");
// }
//
// /**
// * @param propertyName property name
// * @return No getter method Exception
// */
// protected RuntimeException noGetterMethodException(String propertyName) {
// return new IncorrectAccessException("No getter method for property: "
// + propertyName + " [" + type + "].");
// }
//
// /**
// * @param propertyName property name
// * @return No setter method Exception
// */
// protected RuntimeException noSetterMethodException(String propertyName) {
// return new IncorrectAccessException("No setter method for property: "
// + propertyName + " [" + type + "].");
// }
/**
* @return a string representation of the object.
*/
public String toString() {
return getClass().getName() + ": " + type;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy