Package com.evolveum.midpoint.prism.impl
Class TypeDefinitionImpl
- java.lang.Object
-
- com.evolveum.midpoint.prism.AbstractFreezable
-
- com.evolveum.midpoint.prism.impl.DefinitionImpl
-
- com.evolveum.midpoint.prism.impl.TypeDefinitionImpl
-
- All Implemented Interfaces:
Definition
,Freezable
,MutableDefinition
,PrismContextSensitive
,Revivable
,SmartVisitable<Definition>
,TypeDefinition
,Visitable<Definition>
,DebugDumpable
,Serializable
,Cloneable
- Direct Known Subclasses:
ComplexTypeDefinitionImpl
,SimpleTypeDefinitionImpl
public abstract class TypeDefinitionImpl extends DefinitionImpl implements TypeDefinition
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<?>
compileTimeClass
protected Integer
instantiationOrder
protected SerializationProxy
serializationProxy
-
Fields inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
deprecated, deprecatedSince, displayName, displayOrder, documentation, elaborate, emphasized, experimental, help, inherited, isAbstract, isRuntimeSchema, plannedRemoval, processing, typeName
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description TypeDefinitionImpl(QName typeName, PrismContext prismContext, boolean schemaRegistryProvided)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStaticSubType(TypeDefinition subtype)
boolean
canRepresent(QName typeName)
protected void
copyDefinitionData(TypeDefinitionImpl clone)
boolean
equals(Object o)
Class<?>
getCompileTimeClass()
Returns compile-time class, if this type has any.Integer
getInstantiationOrder()
@NotNull Collection<TypeDefinition>
getStaticSubTypes()
Subtypes - but only these that are a part of the static schema.QName
getSuperType()
Name of super type of this complex type definition.int
hashCode()
boolean
isAssignableFrom(TypeDefinition other, SchemaRegistry schemaRegistry)
Crawls up the type hierarchy and looks for type name equivalence.void
setCompileTimeClass(Class<?> compileTimeClass)
void
setInstantiationOrder(Integer instantiationOrder)
void
setSuperType(QName superType)
protected static boolean
useSerializationProxy(boolean localeEnabled)
protected Object
writeReplace()
-
Methods inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
accept, accept, addDiagram, addSchemaMigration, checkMutableOnExposing, clone, copyDefinitionData, debugDump, extendDumpHeader, getAnnotation, getDebugDumpClassName, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocClassName, getDocumentation, getDocumentationPreview, getHelp, getPlannedRemoval, getPrismContext, getProcessing, getSchemaMigrations, getTypeClass, getTypeClassIfKnown, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRuntimeSchema, revive, setAbstract, setAnnotation, setDeprecated, setDeprecatedSince, setDisplayName, setDisplayOrder, setDocumentation, setElaborate, setEmphasized, setExperimental, setHelp, setInherited, setPlannedRemoval, setProcessing, setRuntimeSchema, setTypeName, toString
-
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutable, performFreeze
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Definition
clone, debugDump, getAnnotation, getDeprecatedSince, getDiagrams, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getMutabilityFlag, getPlannedRemoval, getProcessing, getSchemaMigrations, getSchemaRegistry, getTypeClass, getTypeClassIfKnown, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRuntimeSchema, setAnnotation, toMutable
-
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutable
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
Methods inherited from interface com.evolveum.midpoint.prism.SmartVisitable
accept
-
-
-
-
Field Detail
-
compileTimeClass
protected Class<?> compileTimeClass
-
instantiationOrder
protected Integer instantiationOrder
-
serializationProxy
protected final transient SerializationProxy serializationProxy
-
-
Constructor Detail
-
TypeDefinitionImpl
public TypeDefinitionImpl(QName typeName, PrismContext prismContext, boolean schemaRegistryProvided)
-
-
Method Detail
-
useSerializationProxy
protected static boolean useSerializationProxy(boolean localeEnabled)
-
getSuperType
public QName getSuperType()
Description copied from interface:TypeDefinition
Name of super type of this complex type definition. E.g. c:ObjectType is a super type for c:FocusType which is a super type for c:UserType. Or (more complex example) ri:ShadowAttributesType is a super type of ri:AccountObjectClass. (TODO is this really true?)- Specified by:
getSuperType
in interfaceTypeDefinition
-
setSuperType
public void setSuperType(QName superType)
-
getStaticSubTypes
@NotNull public @NotNull Collection<TypeDefinition> getStaticSubTypes()
Description copied from interface:TypeDefinition
Subtypes - but only these that are a part of the static schema. A little bit experimental. :)- Specified by:
getStaticSubTypes
in interfaceTypeDefinition
-
addStaticSubType
public void addStaticSubType(TypeDefinition subtype)
-
getInstantiationOrder
public Integer getInstantiationOrder()
- Specified by:
getInstantiationOrder
in interfaceTypeDefinition
-
setInstantiationOrder
public void setInstantiationOrder(Integer instantiationOrder)
-
getCompileTimeClass
public Class<?> getCompileTimeClass()
Description copied from interface:TypeDefinition
Returns compile-time class, if this type has any. For example, UserType.class, ObjectType.class, ExtensionType.class.- Specified by:
getCompileTimeClass
in interfaceTypeDefinition
-
setCompileTimeClass
public void setCompileTimeClass(Class<?> compileTimeClass)
-
copyDefinitionData
protected void copyDefinitionData(TypeDefinitionImpl clone)
-
canRepresent
public boolean canRepresent(QName typeName)
- Specified by:
canRepresent
in interfaceTypeDefinition
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classDefinitionImpl
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classDefinitionImpl
-
isAssignableFrom
@Experimental public boolean isAssignableFrom(TypeDefinition other, SchemaRegistry schemaRegistry)
Crawls up the type hierarchy and looks for type name equivalence.- Specified by:
isAssignableFrom
in interfaceTypeDefinition
- Returns:
- True if variables of this type can be assigned value of specified other type, i.e. if this type is equal or supertype of the other type.
-
writeReplace
protected Object writeReplace()
-
-