Package javax.lang.model.element

Examples of javax.lang.model.element.ExecutableElement


            AnnotationMirror annotation) {
        assert annotation != null;
        Map<String, AnnotationValue> results = Maps.create();
        for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry
                : annotation.getElementValues().entrySet()) {
            ExecutableElement key = entry.getKey();
            AnnotationValue value = entry.getValue();
            results.put(key.getSimpleName().toString(), value);
        }
        return results;
    }
View Full Code Here


        assert element != null;
        if (validateClassModifiers(element) == false) {
            return null;
        }
        TypeElement type = (TypeElement) element;
        ExecutableElement ctor = findConstructor(type);
        if (ctor == null) {
            return null;
        }
        validateConstructorModifiers(ctor);
        FlowPartClass aClass = analyze(type, ctor);
View Full Code Here

            a.error(1, "マスタ結合演算子の二つ目の引数はモデルオブジェクト型である必要があります");
        }
        for (int i = 2, n = a.countParameters(); i < n; i++) {
            a.error(i, "マスタ結合演算子にはユーザー引数を利用できません");
        }
        ExecutableElement selector = null;
        try {
            selector = MasterKindOperatorAnalyzer.findSelector(context.environment, context);
        } catch (ResolveException e) {
            a.error(e.getMessage());
        }
View Full Code Here

        assert annotation != null;
        TypeMirror annotationType = annotation.asType();

        Set<? extends Element> elements = round.getElementsAnnotatedWith(annotation);
        for (Element element : elements) {
            ExecutableElement method = toOperatorMethodElement(element);
            if (method == null) {
                continue;
            }
            AnnotationMirror annotationMirror = findAnnotation(annotationType, method);
            if (annotationMirror == null) {
View Full Code Here

        assert element != null;
        if (element.getKind() != ElementKind.METHOD) {
            raiseInvalid(element, "演算子{0}はメソッドとして宣言する必要があります");
            return null;
        }
        ExecutableElement method = (ExecutableElement) element;
        validateMethodModifiers(method);

        return method;
    }
View Full Code Here

        Set<ExecutableElement> methods = Sets.create();
        methods.addAll(ElementFilter.methodsIn(type.getEnclosedElements()));

        Set<ExecutableElement> saw = Sets.create();
        for (TargetMethod target : targets) {
            ExecutableElement method = target.method;
            if (saw.contains(method)) {
                raiseInvalid(method, "演算子メソッド{0}には複数の演算子注釈が付与されています");
            } else {
                saw.add(method);
                boolean removed = methods.remove(method);
                assert removed : method;
            }
        }
        for (ExecutableElement method : methods) {
            boolean helper = isOperatorHelper(method);
            boolean open = method.getModifiers().contains(Modifier.PUBLIC);
            if (helper && open == false) {
                raiseInvalid(method, "演算子補助注釈の付いたメソッドはpublicである必要があります");
            } else if (helper == false && open) {
                raiseInvalid(method, "演算子クラスには演算子メソッド以外のpublicメソッドを宣言できません");
            }
View Full Code Here

        Precondition.checkMustNotBeNull(context, "context"); //$NON-NLS-1$
        String selectorName = getSelectorName(context);
        if (selectorName == null) {
            return null;
        }
        ExecutableElement selectorMethod = getSelectorMethod(context, selectorName);
        checkParameters(environment, context.element, selectorMethod);
        return selectorMethod;
    }
View Full Code Here

        }
        ShuffleKey transactionKey = a.getParameterKey(1);
        if (transactionKey == null) {
            a.error("マスタ確認演算子の引数には@Key注釈によってグループ化項目を指定する必要があります");
        }
        ExecutableElement selector = null;
        try {
            selector = MasterKindOperatorAnalyzer.findSelector(context.environment, context);
        } catch (ResolveException e) {
            a.error(e.getMessage());
        }
View Full Code Here

        }
        ShuffleKey transactionKey = a.getParameterKey(1);
        if (transactionKey == null) {
            a.error("マスタつき更新演算子の引数には@Key注釈によってグループ化項目を指定する必要があります");
        }
        ExecutableElement selector = null;
        try {
            selector = MasterKindOperatorAnalyzer.findSelector(context.environment, context);
        } catch (ResolveException e) {
            a.error(e.getMessage());
        }
View Full Code Here

        }
        ShuffleKey transactionKey = a.getParameterKey(1);
        if (transactionKey == null) {
            a.error("マスタ分岐演算子の引数には@Key注釈によってグループ化項目を指定する必要があります");
        }
        ExecutableElement selector = null;
        try {
            selector = MasterKindOperatorAnalyzer.findSelector(context.environment, context);
        } catch (ResolveException e) {
            a.error(e.getMessage());
        }
View Full Code Here

TOP

Related Classes of javax.lang.model.element.ExecutableElement

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.