Package com.sun.mirror.declaration

Examples of com.sun.mirror.declaration.Declaration


        // or a class type.
        if ( fieldType instanceof InterfaceType )
        {
            // Valid interface type decls must be annotated w/ @ControlInterface
            // or @ControlExtension.
            Declaration fieldTypeDecl = ((InterfaceType)fieldType).getDeclaration();
            if ( fieldTypeDecl.getAnnotation(ControlInterface.class) == null &&
                 fieldTypeDecl.getAnnotation(ControlExtension.class) == null )
                printError( f, "control.field.bad.interfacetype" );
        }
        else if ( fieldType instanceof ClassType )
        {
            // Valid class type decls must implements the ControlBean API.
View Full Code Here


                DeclaredType crType = (DeclaredType)av.getValue();
                if ( crType instanceof InterfaceType )
                {
                    // Valid interface type decls must be annotated w/ @ControlInterface
                    // or @ControlExtension.
                    Declaration typeDecl = crType.getDeclaration();
                    if ( typeDecl.getAnnotation(ControlInterface.class) == null &&
                         typeDecl.getAnnotation(ControlExtension.class) == null )
                         printError( t, "control.reference.bad.interfacetype" );
                }
            }
        }
    }
View Full Code Here

        // or a class type.
        if ( fieldType instanceof InterfaceType )
        {
            // Valid interface type decls must be annotated w/ @ControlInterface
            // or @ControlExtension.
            Declaration fieldTypeDecl = ((InterfaceType)fieldType).getDeclaration();
            if ( fieldTypeDecl.getAnnotation(ControlInterface.class) == null &&
                 fieldTypeDecl.getAnnotation(ControlExtension.class) == null )
                printError( f, "control.field.bad.interfacetype" );
        }
        else if ( fieldType instanceof ClassType )
        {
            // Valid class type decls must implements the ControlBean API.
View Full Code Here

                DeclaredType crType = (DeclaredType)av.getValue();
                if ( crType instanceof InterfaceType )
                {
                    // Valid interface type decls must be annotated w/ @ControlInterface
                    // or @ControlExtension.
                    Declaration typeDecl = crType.getDeclaration();
                    if ( typeDecl.getAnnotation(ControlInterface.class) == null &&
                         typeDecl.getAnnotation(ControlExtension.class) == null )
                         printError( t, "control.reference.bad.interfacetype" );
                }
                else {
                    printError( t, "control.reference.bad.interfacetype" );
                }
View Full Code Here

   *
   * @return Whether the any element is a collection.
   */
  public boolean isCollectionType() {
    DecoratedTypeMirror accessorType;
    Declaration delegate = getDelegate();
    if (delegate instanceof FieldDeclaration) {
      accessorType = (DecoratedTypeMirror) TypeMirrorDecorator.decorate(((FieldDeclaration) delegate).getType());
    }
    else {
      accessorType = (DecoratedTypeMirror) TypeMirrorDecorator.decorate(((PropertyDeclaration) delegate).getPropertyType());
View Full Code Here

    for (WebMethod webMethod : ei.getWebMethods()) {
      for (WebParam webParam : webMethod.getWebParameters()) {
        //no out or in/out non-header parameters!
        if (webParam.isHeader()) {
          //unique parameter names for all header parameters of a given ei
          Declaration conflict = paramsByName.put(webParam.getElementName(), webParam);
          if (conflict != null) {
            result.addError(webParam, "C# requires that all header parameters defined in the same endpoint interface have unique names. " +
              "This parameter conflicts with the one at " + (conflict.getPosition() == null ? "(unknown source position)" : conflict.getPosition()));
          }

          DecoratedTypeMirror paramType = (DecoratedTypeMirror) webParam.getType();
          if (paramType.isCollection()) {
            result.addError(webParam, "C# can't handle header parameters that are collections.");
          }

        }
        else if (webParam.getMode() != javax.jws.WebParam.Mode.IN) {
          result.addError(webParam, "C# doesn't support non-header parameters of mode " + webParam.getMode());
        }

        //parameters/results can't be maps
        if (webParam.getType() instanceof MapType) {
          result.addError(webParam, "C# can't handle types that are maps.");
        }
      }

      //web result cannot be a header.
      if (webMethod.getWebResult().isHeader()) {
        Declaration conflict = paramsByName.put(webMethod.getWebResult().getElementName(), webMethod);
        if (conflict != null) {
          result.addError(webMethod, "C# requires that all header parameters defined in the same endpoint interface have unique names. " +
            "This parameter conflicts with the one at " + (conflict.getPosition() == null ? "(unknown source position)" : conflict.getPosition()));
        }
      }

      if (webMethod.getWebResult().getType() instanceof MapType) {
        result.addError(webMethod, "C# can't handle types that are maps.");
View Full Code Here

TOP

Related Classes of com.sun.mirror.declaration.Declaration

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.