Package com.asakusafw.vocabulary.operator

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

TOP

Related Classes of com.asakusafw.vocabulary.operator.Convert

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.