- java.lang.Object
-
- io.github.mmm.bean.impl.BeanTypeImpl
-
- io.github.mmm.bean.impl.BeanClassImpl
-
public final class BeanClassImpl extends BeanTypeImpl implements BeanClass
-
-
Constructor Summary
Constructors Constructor Description BeanClassImpl(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BeanClassImplasClass(Class<? extends VirtualBean> javaClass)static BeanClassImplasClass(Class<? extends VirtualBean> javaClass, Function<Class<?>,BeanClassImpl> factory)static BeanClassImplgetClass(String key)Class<? extends VirtualBean>getJavaClass()Class<?>[]getJavaClasses()StringgetPackageName()VirtualBeangetPrototype()StringgetQualifiedName()StringgetSimpleName()List<BeanClass>getSuperClasses()booleanisVirtual()voidsetPrototype(VirtualBean prototype)-
Methods inherited from class io.github.mmm.bean.impl.BeanTypeImpl
asType, asType, equals, getStableName, getStableName, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.bean.BeanClass
isSubclassOf, isSubclassOf, isSuperclassOf, isSuperclassOf
-
Methods inherited from interface io.github.mmm.bean.BeanType
getStableName
-
-
-
-
Constructor Detail
-
BeanClassImpl
public BeanClassImpl(Class<? extends VirtualBean> javaClass, List<BeanClassImpl> superClassList)
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 Detail
-
getJavaClass
public Class<? extends VirtualBean> getJavaClass()
- Specified by:
getJavaClassin interfaceBeanClass- Specified by:
getJavaClassin interfaceBeanType- Overrides:
getJavaClassin classBeanTypeImpl- Returns:
- the primary
Class(or interface) reflecting the "implementation" of thisBeanType. If thisBeanTypeisvirtualthis will be inherited from the first parent class.
-
getJavaClasses
public Class<?>[] getJavaClasses()
- Specified by:
getJavaClassesin interfaceBeanType- Returns:
- an array with all types (interfaces) composed (implemented) by this
BeanType.
-
getSuperClasses
public List<BeanClass> getSuperClasses()
- Specified by:
getSuperClassesin interfaceBeanClass- Returns:
- the
Collectionof the superBeanClassthis class inherits from.
-
getPackageName
public String getPackageName()
- Specified by:
getPackageNamein interfaceBeanType- Overrides:
getPackageNamein classBeanTypeImpl- Returns:
- packageName the
package name. - See Also:
BeanType.getJavaClass(),Class.getPackageName(),BeanType.getQualifiedName()
-
getSimpleName
public String getSimpleName()
- Specified by:
getSimpleNamein interfaceBeanType- Overrides:
getSimpleNamein classBeanTypeImpl- Returns:
- the
simple name. - See Also:
BeanType.getJavaClass(),Class.getSimpleName(),BeanType.getQualifiedName()
-
getQualifiedName
public String getQualifiedName()
- Specified by:
getQualifiedNamein interfaceBeanType- Overrides:
getQualifiedNamein classBeanTypeImpl- Returns:
- qualifiedName the
qualified namecomposed ofpackage nameandsimple name. - See Also:
BeanType.getPackageName(),BeanType.getSimpleName(),BeanType.getJavaClass(),Class.getName()
-
isVirtual
public boolean isVirtual()
- Specified by:
isVirtualin interfaceBeanType- Overrides:
isVirtualin classBeanTypeImpl- Returns:
trueif thisBeanTypebelongs to aVirtualBeanmeaning that it may represent a class or interface that does not exist as JavaClass,falseotherwise.- See Also:
BeanClass,VirtualBean
-
getPrototype
public VirtualBean 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
public void setPrototype(VirtualBean prototype)
- Parameters:
prototype- theprototype.
-
asClass
public static BeanClassImpl asClass(Class<? extends VirtualBean> javaClass)
- Parameters:
javaClass- theClassreflecting theAdvancedBean.- Returns:
- the
BeanClassfor this instance.
-
getClass
public static BeanClassImpl getClass(String key)
- 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.
-
-