protected Object convert(Object value) { return converters.convert(value, getType()); }
protected Object convert(Object value) { return converters.convert(value, getType()); }
protected Object convert(Object value) { return converters.convert(value, getType()); }
protected Object convert(Object value) { return converters.convert(value, getType()); }
protected Object convert(Object value) { return converters.convert(value, getType()); }
protected Object newCollection(AbstractExternalizablePersistentCollection value, Property field) { final Type target = field.getType(); final boolean initialized = value.isInitialized();
Class<?> fieldClass = TypeUtil.classOfType(field.getType());
public SpecialValueFactory<?> getValueFactory(Property property) { Type propertyType = property.getType(); Class<?> type = TypeUtil.classOfType(propertyType); if (!Externalizable.class.isAssignableFrom(type)) { if ((type.isArray() && type.getComponentType() != byte.class) || Collection.class.isAssignableFrom(type)) { if (property.isAnnotationPresent(AMFVectorInt.class)) return new AMFVectorIntValueFactory(property.getAnnotation(AMFVectorInt.class)); if (property.isAnnotationPresent(AMFVectorNumber.class)) return new AMFVectorNumberValueFactory(property.getAnnotation(AMFVectorNumber.class)); if (property.isAnnotationPresent(AMFVectorUint.class)) return new AMFVectorUintValueFactory(property.getAnnotation(AMFVectorUint.class)); if (property.isAnnotationPresent(AMFVectorObject.class)) { AMFVectorObject annotation = property.getAnnotation(AMFVectorObject.class); String vectorComponentType = annotation.type(); if (vectorComponentType == null || vectorComponentType.length() == 0) { Class<?> componentClass = TypeUtil.componentClassOfType(propertyType); vectorComponentType = vectorObjectAlias.aliasFor(componentClass); } return new AMFVectorObjectValueFactory(annotation, vectorComponentType); } } else if (Map.class.isAssignableFrom(type) && property.isAnnotationPresent(AMFDictionary.class)) { return new AMFDictionaryValueFactory(property.getAnnotation(AMFDictionary.class)); } } return null; }
protected void readStandard(ActionScriptClassDescriptor desc, Object result) throws IOException { // defined values... final int count = desc.getPropertiesCount(); for (int i = 0; i < count; i++) { Property property = desc.getProperty(i); Object value = readObject(readUnsignedByte()); if (value != null && value.getClass() == property.getType()) property.setValue(result, value, false); else property.setValue(result, value, true); } // dynamic values... if (desc.isDynamic()) { while (true) { String name = readAMF3String(); if (name.length() == 0) break; Object value = readObject(readUnsignedByte()); desc.setPropertyValue(name, result, value); } } }
public SpecialValueFactory<?> getValueFactory(Property property) { Type propertyType = property.getType(); Class<?> type = TypeUtil.classOfType(propertyType); if (!Externalizable.class.isAssignableFrom(type)) { if ((type.isArray() && type.getComponentType() != byte.class) || Collection.class.isAssignableFrom(type)) { if (property.isAnnotationPresent(AMFVectorInt.class)) return new AMFVectorIntValueFactory(property.getAnnotation(AMFVectorInt.class)); if (property.isAnnotationPresent(AMFVectorNumber.class)) return new AMFVectorNumberValueFactory(property.getAnnotation(AMFVectorNumber.class)); if (property.isAnnotationPresent(AMFVectorUint.class)) return new AMFVectorUintValueFactory(property.getAnnotation(AMFVectorUint.class)); if (property.isAnnotationPresent(AMFVectorObject.class)) { AMFVectorObject annotation = property.getAnnotation(AMFVectorObject.class); String vectorComponentType = annotation.type(); if (vectorComponentType == null || vectorComponentType.length() == 0) { Class<?> componentClass = TypeUtil.componentClassOfType(propertyType); vectorComponentType = vectorObjectAlias.aliasFor(componentClass); } return new AMFVectorObjectValueFactory(annotation, vectorComponentType); } } else if (Map.class.isAssignableFrom(type) && property.isAnnotationPresent(AMFDictionary.class)) { return new AMFDictionaryValueFactory(property.getAnnotation(AMFDictionary.class)); } } return null; }
protected void readStandard(ActionScriptClassDescriptor desc, Object result) throws IOException { // defined values... final int count = desc.getPropertiesCount(); for (int i = 0; i < count; i++) { Property property = desc.getProperty(i); Object value = readObject(readUnsignedByte()); if (value != null && value.getClass() == property.getType()) property.setValue(result, value, false); else property.setValue(result, value, true); } // dynamic values... if (desc.isDynamic()) { while (true) { String name = readAMF3String(); if (name.length() == 0) break; Object value = readObject(readUnsignedByte()); desc.setPropertyValue(name, result, value); } } }
protected void readStandard(ActionScriptClassDescriptor desc, Object result) throws IOException { // defined values... final int count = desc.getPropertiesCount(); for (int i = 0; i < count; i++) { Property property = desc.getProperty(i); Object value = readObject(readUnsignedByte()); if (value != null && value.getClass() == property.getType()) property.setValue(result, value, false); else property.setValue(result, value, true); } // dynamic values... if (desc.isDynamic()) { while (true) { String name = readAMF3String(); if (name.length() == 0) break; Object value = readObject(readUnsignedByte()); desc.setPropertyValue(name, result, value); } } }
public SpecialValueFactory<?> getValueFactory(Property property) { Type propertyType = property.getType(); Class<?> type = TypeUtil.classOfType(propertyType); if (!Externalizable.class.isAssignableFrom(type)) { if ((type.isArray() && type.getComponentType() != byte.class) || Collection.class.isAssignableFrom(type)) { if (property.isAnnotationPresent(AMFVectorInt.class)) return new AMFVectorIntValueFactory(property.getAnnotation(AMFVectorInt.class)); if (property.isAnnotationPresent(AMFVectorNumber.class)) return new AMFVectorNumberValueFactory(property.getAnnotation(AMFVectorNumber.class)); if (property.isAnnotationPresent(AMFVectorUint.class)) return new AMFVectorUintValueFactory(property.getAnnotation(AMFVectorUint.class)); if (property.isAnnotationPresent(AMFVectorObject.class)) { AMFVectorObject annotation = property.getAnnotation(AMFVectorObject.class); String vectorComponentType = annotation.type(); if (vectorComponentType == null || vectorComponentType.length() == 0) { Class<?> componentClass = TypeUtil.componentClassOfType(propertyType); vectorComponentType = vectorObjectAlias.aliasFor(componentClass); } return new AMFVectorObjectValueFactory(annotation, vectorComponentType); } } else if (Map.class.isAssignableFrom(type) && property.isAnnotationPresent(AMFDictionary.class)) { return new AMFDictionaryValueFactory(property.getAnnotation(AMFDictionary.class)); } } return null; }
value = newCollection((AbstractExternalizablePersistentCollection)value, field); else { Type targetType = TypeUtil.resolveTypeVariable(field.getType(), field.getDeclaringClass(), declaringTypes); value = converters.convert(value, targetType);
value = newHibernateCollection((AbstractExternalizablePersistentCollection)value, field); else if (!(value instanceof HibernateProxy)) { Type targetType = TypeUtil.resolveTypeVariable(field.getType(), field.getDeclaringClass(), declaringTypes); value = converters.convert(value, targetType);
protected PersistentCollection newHibernateCollection(AbstractExternalizablePersistentCollection value, Property field) { final Type target = field.getType(); final boolean initialized = value.isInitialized(); final String metadata = value.getMetadata();