java.lang.Object
io.github.mmm.bean.impl.AbstractBeanType
io.github.mmm.bean.impl.BeanClassImpl
- All Implemented Interfaces:
BeanClass,BeanType,io.github.mmm.bean.impl.properties.BeanPropertiesFactory
-
Constructor Summary
ConstructorsConstructorDescriptionBeanClassImpl(Class<? extends VirtualBean> javaClass, List<BeanClassImpl> superClassList) The constructor.BeanClassImpl(Class<? extends VirtualBean> javaClass, List<BeanClassImpl> superClassList, String stableName) The constructor.BeanClassImpl(Class<? extends VirtualBean> javaClass, List<BeanClassImpl> superClassList, String stableName, String simpleName) The constructor.BeanClassImpl(Class<? extends VirtualBean> javaClass, List<BeanClassImpl> superClassList, String packageName, String stableName, String simpleName) The constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic BeanClassImplasClass(Class<? extends VirtualBean> javaClass) static BeanClassImplasClass(Class<? extends VirtualBean> javaClass, Function<Class<?>, BeanClassImpl> factory) io.github.mmm.bean.impl.properties.BeanPropertiescreate(AbstractBean bean) static BeanClassImplClass<? extends VirtualBean> Class<?>[]booleanvoidsetPrototype(VirtualBean prototype) Methods inherited from class io.github.mmm.bean.impl.AbstractBeanType
equals, getMetaInfo, getStableName, getStableName, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.mmm.bean.BeanClass
isSubclassOf, isSubclassOf, isSuperclassOf, isSuperclassOfMethods inherited from interface io.github.mmm.bean.BeanType
getMetaInfo, getStableName
-
Constructor Details
-
BeanClassImpl
The constructor.- Parameters:
javaClass- theClassof theBeanto reflect.superClassList- thesuper-classes.
-
BeanClassImpl
public BeanClassImpl(Class<? extends VirtualBean> javaClass, List<BeanClassImpl> superClassList, String stableName) The constructor.- Parameters:
javaClass- theClassof theBeanto reflect.superClassList- thesuper-classes.stableName- thestable name.
-
BeanClassImpl
public BeanClassImpl(Class<? extends VirtualBean> javaClass, List<BeanClassImpl> superClassList, String stableName, String simpleName) The constructor.- Parameters:
javaClass- theClassof theBeanto reflect.superClassList- thesuper-classes.stableName- thestable name.simpleName- thesimple name.
-
BeanClassImpl
public BeanClassImpl(Class<? extends VirtualBean> javaClass, List<BeanClassImpl> superClassList, String packageName, String stableName, String simpleName) The constructor.- Parameters:
javaClass- theClassof theBeanto reflect.superClassList- thesuper-classes.packageName- thepackage name.stableName- thestable name.simpleName- thesimple name.
-
-
Method Details
-
getJavaClass
- Specified by:
getJavaClassin interfaceBeanClass- Specified by:
getJavaClassin interfaceBeanType- Overrides:
getJavaClassin classAbstractBeanType- Returns:
- the primary
Class(or interface) reflecting the "implementation" of thisBeanType. If thisBeanTypeisvirtualthis will be inherited from the first parent class.
-
getJavaClasses
- Specified by:
getJavaClassesin interfaceBeanType- Returns:
- an array with all types (interfaces) composed (implemented) by this
BeanType.
-
getSuperClasses
- Specified by:
getSuperClassesin interfaceBeanClass- Returns:
- the
Collectionof the superBeanClassthis class inherits from.
-
getPackageName
- Specified by:
getPackageNamein interfaceBeanType- Overrides:
getPackageNamein classAbstractBeanType- Returns:
- packageName the
package name. - See Also:
-
getSimpleName
- Specified by:
getSimpleNamein interfaceBeanType- Overrides:
getSimpleNamein classAbstractBeanType- Returns:
- the
simple name. - See Also:
-
getQualifiedName
- Specified by:
getQualifiedNamein interfaceBeanType- Overrides:
getQualifiedNamein classAbstractBeanType- Returns:
- qualifiedName the
qualified namecomposed ofpackage nameandsimple name. - See Also:
-
isVirtual
public boolean isVirtual()- Specified by:
isVirtualin interfaceBeanType- Overrides:
isVirtualin classAbstractBeanType- Returns:
trueif thisBeanTypebelongs to aVirtualBeanmeaning that it may represent a class or interface that does not exist as JavaClass,falseotherwise.- See Also:
-
getPrototype
- Specified by:
getPrototypein interfaceBeanClass- Returns:
- the prototype of this
BeanClass. Properties added to this prototype will be inherited by all instances of thisBeanClassincluding those created before adding the new property.
-
setPrototype
- Parameters:
prototype- theprototype.
-
create
- Specified by:
createin interfaceio.github.mmm.bean.impl.properties.BeanPropertiesFactory- Parameters:
bean- thebeanfor which to create theBeanProperties.- Returns:
- the new
BeanPropertiesto use.
-
asClass
- Parameters:
javaClass- theClassreflecting theAdvancedBean.- Returns:
- the
BeanClassfor this instance.
-
getClass
- Parameters:
key- the fully-qualified (virtual or physical) class-name.- Returns:
- the
BeanClassfor this instance.
-
asClass
public static BeanClassImpl asClass(Class<? extends VirtualBean> javaClass, Function<Class<?>, BeanClassImpl> factory) - Parameters:
javaClass- theClassreflecting theAdvancedBean.factory- aFunctionto get or createBeanClassImplbyClass.- Returns:
- the
BeanClassfor this instance.
-