Package com.embabel.agent.core
Class DynamicType
-
- All Implemented Interfaces:
-
com.embabel.agent.core.DomainType,com.embabel.common.core.types.Described,com.embabel.common.core.types.HasInfoString,com.embabel.common.core.types.Named,com.embabel.common.core.types.NamedAndDescribed
public final class DynamicType implements DomainType
Simple data type
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final Stringdescriptionprivate final List<PropertyDefinition>ownPropertiesprivate final List<DomainType>parentsprivate final BooleancreationPermittedprivate final List<PropertyDefinition>propertiesprivate final Set<String>labelsprivate final StringownLabel
-
Constructor Summary
Constructors Constructor Description DynamicType(String name, String description, List<PropertyDefinition> ownProperties, List<DomainType> parents, Boolean creationPermitted)
-
Method Summary
Modifier and Type Method Description StringgetName()StringgetDescription()List<PropertyDefinition>getOwnProperties()Properties defined on this type only (not inherited) List<DomainType>getParents()BooleangetCreationPermitted()Is instance creation permitted? BooleanisAssignableFrom(Class<?> other)BooleanisAssignableFrom(DomainType other)BooleanisAssignableTo(Class<?> other)BooleanisAssignableTo(DomainType other)Collection<DomainType>children(Collection<String> additionalBasePackages)Get all descendant types from the classpath. final DynamicTypewithProperty(PropertyDefinition property)StringinfoString(Boolean verbose, Integer indent)-
-
Constructor Detail
-
DynamicType
DynamicType(String name, String description, List<PropertyDefinition> ownProperties, List<DomainType> parents, Boolean creationPermitted)
- Parameters:
name- name of the type.description- description of the typeparents- parent types of this type.
-
-
Method Detail
-
getDescription
String getDescription()
-
getOwnProperties
List<PropertyDefinition> getOwnProperties()
Properties defined on this type only (not inherited)
-
getParents
List<DomainType> getParents()
-
getCreationPermitted
Boolean getCreationPermitted()
Is instance creation permitted? Or is this reference data?
-
isAssignableFrom
Boolean isAssignableFrom(Class<?> other)
-
isAssignableFrom
Boolean isAssignableFrom(DomainType other)
-
isAssignableTo
Boolean isAssignableTo(Class<?> other)
-
isAssignableTo
Boolean isAssignableTo(DomainType other)
-
children
Collection<DomainType> children(Collection<String> additionalBasePackages)
Get all descendant types from the classpath. For JvmType: scans the classpath for classes that extend or implement this type. For DynamicType: returns empty list as dynamic types don't have classpath descendants.
- Parameters:
additionalBasePackages- additional base packages to scan for descendants We always include the package of this type as a base package.
-
withProperty
final DynamicType withProperty(PropertyDefinition property)
-
infoString
String infoString(Boolean verbose, Integer indent)
-
-
-
-