Class ActualValueReflectionTypeDescriptor<T>
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.vilTypes.TypeDescriptor<T>
-
- net.ssehub.easy.instantiation.core.model.vilTypes.ReflectionTypeDescriptor<T>
-
- net.ssehub.easy.instantiation.core.model.vilTypes.ActualValueReflectionTypeDescriptor<T>
-
- Type Parameters:
T- the type
- All Implemented Interfaces:
IActualValueProvider,IMetaType
public class ActualValueReflectionTypeDescriptor<T> extends ReflectionTypeDescriptor<T> implements IActualValueProvider
Allows the use theIActualValueProvidermechanism for reflective types. However, we need to create an instance of the reflective type in order to make the interface available. Thus, classes using this descriptor must implement a (not necessarily accessible) no-argument constructor.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private IActualValueProvidertemplate-
Fields inherited from class net.ssehub.easy.instantiation.core.model.vilTypes.ReflectionTypeDescriptor
ANY, NAME_ANY, NAME_TYPE, NAME_VERSION, NAME_VOID, PSEUDO_TYPES, TYPE, VERSION, VOID
-
Fields inherited from class net.ssehub.easy.instantiation.core.model.vilTypes.TypeDescriptor
EMPTY
-
-
Constructor Summary
Constructors Constructor Description ActualValueReflectionTypeDescriptor(java.lang.reflect.Constructor<T> templateCons)Creates a new type descriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectdetermineActualValue(java.lang.Object object)Determines a more actual value forobjectin the context of using it for this type.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.vilTypes.ReflectionTypeDescriptor
addPlaceholderOperation, canBeInstantiated, checkConversion, considerAsConstructor, create, createDescriptor, enableMethod, getAlias, getBaseType, getDefaultValue, getName, getQualifiedName, getRegName, getSuperType, getTypeClass, getTypeRegistry, getVilName, isActualTypeOf, isAssignableFrom, isAssignableFrom, isBasicType, isCollection, isCollection, isInstance, isInstantiator, isInternal, isIterator, isIterator, isMap, isMap, isPlaceholder, isSameType, isSequence, isSequence, isSet, isSet, processInner, resolve, resolveFields, stripGetterPrefix, toString
-
Methods inherited from class net.ssehub.easy.instantiation.core.model.vilTypes.TypeDescriptor
addOperation, allInstances, appendParameter, createArray, enableDynamicDispatch, findCollectionIteratorOperation, findConversion, findConversion, findConversionOnBoth, flatten, flattenParam, getCandidates, getCandidates, getConversion, getConversions, getConversionsCount, getConversionToSequence, getField, getField, getFieldCount, getFields, getGenericParameter, getGenericParameterCount, getGenericParameterType, getOperation, getOperations, getOperationsCount, isFieldsNull, isInitialized, isNameSet, isSame, setConversions, setFields, setFields, setName, setOperations
-
-
-
-
Field Detail
-
template
private IActualValueProvider template
-
-
Constructor Detail
-
ActualValueReflectionTypeDescriptor
ActualValueReflectionTypeDescriptor(java.lang.reflect.Constructor<T> templateCons) throws VilException
Creates a new type descriptor.- Parameters:
templateCons- the template constructor- Throws:
VilException- if analyzing the class fails for some reason
-
-
Method Detail
-
determineActualValue
public java.lang.Object determineActualValue(java.lang.Object object)
Description copied from interface:IActualValueProviderDetermines a more actual value forobjectin the context of using it for this type. Default types implementing this interface shall not use their attributes as this method will be called via a template object.- Specified by:
determineActualValuein interfaceIActualValueProvider- Parameters:
object- the initial object (may be null)- Returns:
- the actual object (may be
objectif no actual value is available, may be null ifobjectwas null)
-
-