Examples of ExecutableElement


Examples of javax.lang.model.element.ExecutableElement

            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

Examples of javax.lang.model.element.ExecutableElement

        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

Examples of javax.lang.model.element.ExecutableElement

        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

Examples of javax.lang.model.element.ExecutableElement

        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

Examples of javax.lang.model.element.ExecutableElement

        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

Examples of javax.lang.model.element.ExecutableElement

        }
        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

Examples of javax.lang.model.element.ExecutableElement

        }
        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

Examples of javax.lang.model.element.ExecutableElement

        }
        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

Examples of javax.lang.model.element.ExecutableElement

      case CONSTRUCTOR:
      case METHOD:
        virtual =
            parent.getEnclosingElement().getKind()
            != javax.lang.model.element.ElementKind.INTERFACE;
        ExecutableElement method = (ExecutableElement) parent;
        switch (method.getReturnType().getKind()) {
          case VOID:
            /* For void methods. */
            returnType = utils.getTypeNameForType(method.getReturnType());
            break;
          case NONE:
            /* For constructors. */
            returnType = null;
            break;
          case PACKAGE:
            /* Should not happen. */
            throw new RuntimeException(
                "ExecutableElement has PACKAGE return type");
          default:
            returnType = utils.getTypeNameForType(
                utils.typeUtils.erasure(method.getReturnType()));
        }
    }

    return new ContractAnnotationModel(kind, primary, virtual,
                                       owner, returnType);
View Full Code Here

Examples of javax.lang.model.element.ExecutableElement

  protected void addAttributes(TypeElement type, String taglib, Element tagElement, String tagName, Document document)
      throws ClassNotFoundException {

    for (javax.lang.model.element.Element element : getAllMembers(type)) {
      if (element instanceof ExecutableElement) {
        ExecutableElement executableElement = (ExecutableElement) element;
        if (executableElement.getAnnotation(TagAttribute.class) == null
            && executableElement.getAnnotation(UIComponentTagAttribute.class) == null) {
          continue;
        }
        addAttribute(executableElement, taglib, tagElement, tagName, document);
      }
    }
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.