Package org.jboss.errai.marshalling.client.api.exceptions

Examples of org.jboss.errai.marshalling.client.api.exceptions.MarshallingException


    if (o.isObject() != null) {
      EJValue numValue = o.isObject().get(SerializationParts.NUMERIC_VALUE);
      return Long.parseLong(numValue.isString().stringValue());
    }
    else {
      throw new MarshallingException("cannot demarshall as java.lang.Long: expected qualified value but got: " + o);
    }
  }
View Full Code Here


      @Override
      public Marshaller<Object> getMarshaller(String clazz) {
        MappingDefinition def = factory.getDefinition(clazz);

        if (def == null) {
          throw new MarshallingException("class is not available to the marshaller framework: " + clazz);
        }

        return def.getMarshallerInstance();
      }
View Full Code Here

      else {
        return o.getRawValue();
      }
    }
    catch (Exception e) {
      throw new MarshallingException("Failed to demarshall an instance of " + definition.getMappingClass(), e);
    }
  }
View Full Code Here

      @Override
      public Marshaller<Object> getMarshaller(final String clazz) {
        final MappingDefinition def = factory.getDefinition(clazz);

        if (def == null) {
          throw new MarshallingException("class is not available to the marshaller framework: " + clazz);
        }

        return def.getMarshallerInstance();
      }
View Full Code Here

                    constructorParameters.add(context.getArrayMarshallerCallback()
                        .demarshall(type, extractJSONObjectProperty(mapping.getKey(), EJObject.class)));
                  }
                }
                else {
                  throw new MarshallingException("Encountered non-marshallable type " + toMap +
                          " while building a marshaller for " + mappingDefinition.getMappingClass());
                }
              }
              else {
                MarshallingGenUtil.ensureMarshallerFieldCreated(classStructureBuilder, toMap, type, lazyInitMethod);
                if (context.canMarshal(type.getFullyQualifiedName())) {
                  Statement s = maybeAddAssumedTypes(builder,
                      "c" + constructorParameters.size(),
                      // null,
                      mapping, fieldDemarshall(mapping, EJObject.class));

                  constructorParameters.add(s);
                }
                else {
                  throw new MarshallingException("Encountered non-marshallable type " + type +
                          " while building a marshaller for " + mappingDefinition.getMappingClass());
                }
              }
            }
View Full Code Here

            compType = MetaClassFactory.get(Object.class);
            marshaller = factory.getDefinition(Object.class).getMarshallerInstance();
          }

          if (marshaller == null) {
            throw new MarshallingException("Failed to generate array marshaller for " + type.getCanonicalName() +
                " because marshaller for " + compType + " could not be found.");
          }

          MappingDefinition newDef = new MappingDefinition(
              EncDecUtil.qualifyMarshaller(
View Full Code Here

      else {
        return o.getRawValue();
      }
    }
    catch (Exception e) {
      throw new MarshallingException("Failed to demarshall an instance of " + definition.getMappingClass(), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.marshalling.client.api.exceptions.MarshallingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.