@Override public AegisType createCollectionType(TypeClassInfo info) { if (!(info.getType() instanceof ParameterizedType)) { throw new DatabindingException("Cannot create mapping for " + info.getType() + ", unspecified component type for " + info.getDescription()); } return createCollectionTypeFromGeneric(info); }
@Override public AegisType createCollectionType(TypeClassInfo info) { if (!(info.getType() instanceof ParameterizedType)) { throw new DatabindingException("Cannot create mapping for " + info.getType() + ", unspecified component type for " + info.getDescription()); } return createCollectionTypeFromGeneric(info); }
@Override public AegisType createCollectionType(TypeClassInfo info) { /* If it is a parameterized type, then we already know * the parameter(s) and we don't need to fish them out of the XML. */ if (info.getType() instanceof Class) { return createCollectionTypeFromGeneric(info); } return nextCreator.createCollectionType(info); }
@Override public AegisType createCollectionType(TypeClassInfo info) { /* If it is a parameterized type, then we already know * the parameter(s) and we don't need to fish them out of the XML. */ if (info.getType() instanceof Class) { return createCollectionTypeFromGeneric(info); } return nextCreator.createCollectionType(info); }
protected QName createMapQName(TypeClassInfo info, AegisType keyType, AegisType valueType) { String name = keyType.getSchemaType().getLocalPart() + '2' + valueType.getSchemaType().getLocalPart(); Class<?> cls = TypeUtil.getTypeRelatedClass(info.getType()); name += cls.getSimpleName(); // TODO: Get namespace from XML? return new QName(tm.getMappingIdentifierURI(), name); }
protected QName createMapQName(TypeClassInfo info, AegisType keyType, AegisType valueType) { String name = keyType.getSchemaType().getLocalPart() + '2' + valueType.getSchemaType().getLocalPart(); Class<?> cls = TypeUtil.getTypeRelatedClass(info.getType()); name += cls.getSimpleName(); // TODO: Get namespace from XML? return new QName(tm.getMappingIdentifierURI(), name); }
@Override public AegisType createCollectionType(TypeClassInfo info) { Type type = info.getType(); Type componentType = getComponentType(type, 0); if (componentType != null) { return createCollectionTypeFromGeneric(info); } return nextCreator.createCollectionType(info); }
@Override public AegisType createEnumType(TypeClassInfo info) { Element mapping = findMapping(info.getType()); if (mapping != null) { return super.createEnumType(info); } return nextCreator.createEnumType(info); }
@Override protected AegisType getOrCreateMapValueType(TypeClassInfo info) { AegisType type = null; if (info.getType() instanceof ParameterizedType) { // well, let's hope that someone has filled in the value type. type = createTypeFromGeneric(info.getValueType()); } if (type == null) { type = super.getOrCreateMapValueType(info); } return type; }
@Override public AegisType createCollectionType(TypeClassInfo info) { Type type = info.getType(); Type componentType = getComponentType(type, 0); if (componentType != null) { return createCollectionTypeFromGeneric(info); } return nextCreator.createCollectionType(info); }
@Override public AegisType createEnumType(TypeClassInfo info) { Element mapping = findMapping(info.getType()); if (mapping != null) { return super.createEnumType(info); } return nextCreator.createEnumType(info); }
@Override protected AegisType getOrCreateMapValueType(TypeClassInfo info) { AegisType type = null; if (info.getType() instanceof ParameterizedType) { // well, let's hope that someone has filled in the value type. type = createTypeFromGeneric(info.getValueType()); } if (type == null) { type = super.getOrCreateMapValueType(info); } return type; }
protected AegisType createMapType(TypeClassInfo info, AegisType keyType, AegisType valueType) { QName schemaType = createMapQName(info, keyType, valueType); MapType type = new MapType(schemaType, keyType, valueType); type.setTypeMapping(getTypeMapping()); type.setTypeClass(info.getType()); return type; }
protected AegisType createMapType(TypeClassInfo info, AegisType keyType, AegisType valueType) { QName schemaType = createMapQName(info, keyType, valueType); MapType type = new MapType(schemaType, keyType, valueType); type.setTypeMapping(getTypeMapping()); type.setTypeClass(info.getType()); return type; }