Examples of AtomicTypeSG


Examples of org.apache.ws.jaxme.generator.sg.AtomicTypeSG

  public void forAllValues(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, SGlet pSGlet) throws SAXException {
    pSGlet.generate(pMethod, pValue);
  }

    public boolean isCausingParseConversionEvent(SimpleTypeSG pController) {
    final AtomicTypeSG atomicType = pController.getAtomicType();
    /* See addValidation(SimpleTypeSG, JavaMethod, DirectAccessible) for
     * when an exception can be thrown.
     */
    return atomicType.getLength() != null
       ||  atomicType.getMinLength() != null
       ||  atomicType.getMaxLength() != null;
    }
View Full Code Here

Examples of org.apache.ws.jaxme.generator.sg.AtomicTypeSG

    public void addValidation(SimpleTypeSG pController, JavaMethod pMethod, DirectAccessible pValue)
      throws SAXException {
    /* If you add additional checks here, you should possibly modify
     * the isCausingParseConversionEvent(SimpleTypeSG) method as well.
     */
    final AtomicTypeSG atomicType = pController.getAtomicType();
    Long length = atomicType.getLength();
    Long maxLength = atomicType.getMaxLength();
    Long minLength = atomicType.getMinLength();

    if (minLength != null  &&  minLength.longValue() < 0) {
      throw new LocSAXException("Negative value for minLength detected: " + minLength, getLocator());
    }
    if (maxLength != null) {
View Full Code Here

Examples of org.apache.ws.jaxme.generator.sg.AtomicTypeSG

  public void forAllValues(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, SGlet pSGlet) throws SAXException {
    pSGlet.generate(pMethod, pValue);
  }

  public void addValidation(SimpleTypeSG pController, JavaMethod pMethod, DirectAccessible pValue) {
    AtomicTypeSG atomicType = pController.getAtomicType();
    Long totalDigits = atomicType.getTotalDigits();
    if (totalDigits != null) {
      pMethod.addIf(pValue, ".signum()", " == -1");
      pMethod.addIf(pValue, ".toString().length() - 1", " > ", totalDigits);
      pMethod.addThrowNew(IllegalArgumentException.class,
                          JavaSource.getQuoted("Length of " + totalDigits + " digits exceeded: "), " + " + pValue);
View Full Code Here

Examples of org.apache.ws.jaxme.generator.sg.AtomicTypeSG

    pSGlet.generate(pMethod, pValue);
  }

  public void addValidation(SimpleTypeSG pController, JavaMethod pMethod, DirectAccessible pValue)
      throws SAXException {
    AtomicTypeSG atomicType = pController.getAtomicType();
    Long length = atomicType.getLength();
    Long maxLength = atomicType.getMaxLength();
    Long minLength = atomicType.getMinLength();

    if (minLength != null  &&  minLength.longValue() < 0) {
      throw new LocSAXException("Negative value for minLength detected: " + minLength, getLocator());
    }
    if (maxLength != null) {
View Full Code Here

Examples of org.apache.ws.jaxme.generator.sg.AtomicTypeSG

  public void forAllValues(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, SGlet pSGlet) throws SAXException {
    pSGlet.generate(pMethod, pValue);
  }

  public void addValidation(SimpleTypeSG pController, JavaMethod pMethod, DirectAccessible pValue) {
    AtomicTypeSG atomicType = pController.getAtomicType();
    Long totalDigits = atomicType.getTotalDigits();
    if (totalDigits != null) {
      pMethod.addIf(pValue, ".signum()", " == -1");
      pMethod.addIf(pValue, ".toString().length() - 1", " > ", totalDigits);
      pMethod.addThrowNew(IllegalArgumentException.class,
                          JavaSource.getQuoted("Length of " + totalDigits + " digits exceeded: "), " + " + pValue);
View Full Code Here

Examples of org.apache.ws.jaxme.generator.sg.AtomicTypeSG

    pSGlet.generate(pMethod, pValue);
  }

  public void addValidation(SimpleTypeSG pController, JavaMethod pMethod, DirectAccessible pValue)
      throws SAXException {
    AtomicTypeSG atomicType = pController.getAtomicType();
    Long length = atomicType.getLength();
    Long maxLength = atomicType.getMaxLength();
    Long minLength = atomicType.getMinLength();

    if (minLength != null  &&  minLength.longValue() < 0) {
      throw new LocSAXException("Negative value for minLength detected: " + minLength, getLocator());
    }
    if (maxLength != null) {
View Full Code Here

Examples of org.apache.ws.jaxme.generator.sg.AtomicTypeSG

    pSGlet.generate(pMethod, pValue);
  }

  public void addValidation(SimpleTypeSG pController, JavaMethod pMethod,
                final DirectAccessible pValue) {
    AtomicTypeSG atomicType = pController.getAtomicType();
    Long totalDigits = atomicType.getTotalDigits();
    if (totalDigits != null) {
      pMethod.addIf(pValue, ".signum()", " == -1");
      pMethod.addIf(pValue, ".toString().length() - 1", " > ", totalDigits);
      pMethod.addThrowNew(IllegalArgumentException.class,
                          JavaSource.getQuoted("Length of " + totalDigits + " digits exceeded: "), " + ", pValue);
View Full Code Here

Examples of org.apache.ws.jaxme.generator.sg.AtomicTypeSG

  public void forAllValues(SimpleTypeSG pController, JavaMethod pMethod, Object pValue, SGlet pSGlet) throws SAXException {
    pSGlet.generate(pMethod, pValue);
  }

    public boolean isCausingParseConversionEvent(SimpleTypeSG pController) {
    final AtomicTypeSG atomicType = pController.getAtomicType();
    /* See addValidation(SimpleTypeSG, JavaMethod, DirectAccessible) for
     * when an exception can be thrown.
     */
    return atomicType.getLength() != null
       ||  atomicType.getMinLength() != null
       ||  atomicType.getMaxLength() != null;
    }
View Full Code Here

Examples of org.apache.ws.jaxme.generator.sg.AtomicTypeSG

    public void addValidation(SimpleTypeSG pController, JavaMethod pMethod, DirectAccessible pValue)
      throws SAXException {
    /* If you add additional checks here, you should possibly modify
     * the isCausingParseConversionEvent(SimpleTypeSG) method as well.
     */
    final AtomicTypeSG atomicType = pController.getAtomicType();
    Long length = atomicType.getLength();
    Long maxLength = atomicType.getMaxLength();
    Long minLength = atomicType.getMinLength();

    if (minLength != null  &&  minLength.longValue() < 0) {
      throw new LocSAXException("Negative value for minLength detected: " + minLength, getLocator());
    }
    if (maxLength != null) {
View Full Code Here

Examples of org.apache.ws.jaxme.generator.sg.AtomicTypeSG

    pSGlet.generate(pMethod, pValue);
  }

  public void addValidation(SimpleTypeSG pController, JavaMethod pMethod,
                final DirectAccessible pValue) {
    AtomicTypeSG atomicType = pController.getAtomicType();
    Long totalDigits = atomicType.getTotalDigits();
    if (totalDigits != null) {
      pMethod.addIf(pValue, ".signum()", " == -1");
      pMethod.addIf(pValue, ".toString().length() - 1", " > ", totalDigits);
      pMethod.addThrowNew(IllegalArgumentException.class,
                          JavaSource.getQuoted("Length of " + totalDigits + " digits exceeded: "), " + ", pValue);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.