Examples of Convert


Examples of br.com.caelum.vraptor.Convert

    logger.info("Registering bundled converters");
  }

  @Override
  public void register(Class<? extends Converter<?>> converterClass) {
    Convert type = converterClass.getAnnotation(Convert.class);
    checkState(type != null, "The converter type %s should have the Convert annotation", converterClass.getName());

    logger.debug("adding converter {} to {}", converterClass, type.value());
    classes.add(converterClass);
  }
View Full Code Here

Examples of com.asakusafw.vocabulary.operator.Convert

        for (int i = 1, n = a.countParameters(); i < n; i++) {
            if (a.getParameterType(i).isBasic() == false) {
                a.error(i, "変換演算子の2つ目以降の引数は文字列またはプリミティブ型である必要があります");
            }
        }
        Convert annotation = context.element.getAnnotation(Convert.class);
        if (annotation == null) {
            a.error("注釈の解釈に失敗しました");
            return null;
        }
        OperatorProcessorUtil.checkPortName(a, new String[] {
                annotation.originalPort(),
                annotation.convertedPort(),
        });
        if (a.hasError()) {
            return null;
        }

        Builder builder = new Builder(getTargetAnnotationType(), context);
        builder.addAttribute(a.getObservationCount());
        builder.setDocumentation(a.getExecutableDocument());
        builder.addInput(
                a.getParameterDocument(0),
                a.getParameterName(0),
                a.getParameterType(0).getType(),
                0);
        builder.addOutput(
                "入力された内容",
                annotation.originalPort(),
                a.getParameterType(0).getType(),
                a.getParameterName(0),
                0);
        builder.addOutput(
                a.getReturnDocument(),
                annotation.convertedPort(),
                a.getReturnType().getType(),
                null,
                null);
        for (int i = 1, n = a.countParameters(); i < n; i++) {
            builder.addParameter(
View Full Code Here

Examples of com.google.test.metric.method.op.stack.Convert

  }

  private void convert(final Type from, final Type to) {
    recorder.add(new Runnable() {
      public void run() {
        block.addOp(new Convert(lineNumber, from, to));
      }
    });
  }
View Full Code Here

Examples of com.headius.invokebinder.transform.Convert

     *
     * @param target the target MethodType
     * @return a new Binder
     */
    public Binder convert(MethodType target) {
        return new Binder(this, new Convert(type()), target);
    }
View Full Code Here

Examples of javax.persistence.Convert

      return;
    }

    {
      // @Convert annotation on the Embeddable attribute
      final Convert convertAnnotation = property.getAnnotation( Convert.class );
      if ( convertAnnotation != null ) {
        final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, property );
        attributeConversionInfoMap.put( property.getName(), info );
      }
    }
View Full Code Here

Examples of javax.persistence.Convert

        }
        catch (ClassNotFoundException e) {
          throw new AnnotationException( "Unable to find specified converter class id-class: " + converterClassName, e );
        }
      }
      final Convert convertAnnotation = AnnotationFactory.create( convertAnnotationDescriptor );
      final String qualifiedAttributeName = qualifyConverterAttributeName(
          attributeNamePrefix,
          convertAnnotation.attributeName()
      );
      convertAnnotationsMap.put( qualifiedAttributeName, convertAnnotation );
    }

  }
View Full Code Here

Examples of javax.persistence.Convert

  }

  private void applyPhysicalConvertAnnotations(
      String attributeNamePrefix,
      Map<String, Convert> convertAnnotationsMap) {
    final Convert physicalAnnotation = getPhysicalAnnotation( Convert.class );
    if ( physicalAnnotation != null ) {
      // only add if no XML element named a converter for this attribute
      final String qualifiedAttributeName = qualifyConverterAttributeName( attributeNamePrefix, physicalAnnotation.attributeName() );
      if ( ! convertAnnotationsMap.containsKey( qualifiedAttributeName ) ) {
        convertAnnotationsMap.put( qualifiedAttributeName, physicalAnnotation );
      }
    }
    final Converts physicalGroupingAnnotation = getPhysicalAnnotation( Converts.class );
View Full Code Here

Examples of javax.persistence.Convert

      // not sure this is valid condition
      return;
    }

    {
      final Convert convertAnnotation = collectionProperty.getAnnotation( Convert.class );
      if ( convertAnnotation != null ) {
        applyLocalConvert( convertAnnotation, collectionProperty, elementAttributeConversionInfoMap, keyAttributeConversionInfoMap );
      }
    }
View Full Code Here

Examples of javax.persistence.Convert

    if ( ! canContainConvert ) {
      return;
    }

    {
      final Convert convertAnnotation = xClass.getAnnotation( Convert.class );
      if ( convertAnnotation != null ) {
        final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, xClass );
        if ( StringHelper.isEmpty( info.getAttributeName() ) ) {
          throw new IllegalStateException( "@Convert placed on @Entity/@MappedSuperclass must define attributeName" );
        }
View Full Code Here

Examples of javax.persistence.Convert

      return;
    }

    {
      // @Convert annotation on the Embeddable attribute
      final Convert convertAnnotation = property.getAnnotation( Convert.class );
      if ( convertAnnotation != null ) {
        final AttributeConversionInfo info = new AttributeConversionInfo( convertAnnotation, property );
        if ( StringHelper.isEmpty( info.getAttributeName() ) ) {
          attributeConversionInfoMap.put( propertyName, info );
        }
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.