Package com.sun.mirror.apt

Examples of com.sun.mirror.apt.Messager.printError()


            if (! (_decl instanceof TypeDeclaration)) {
                return;
            }
            WebService wsAnnotation = _decl.getAnnotation(WebService.class);
            if (null == wsAnnotation) {
                messager.printError(_decl.getPosition(), "@WebService annotation missing; unable to process: " + ((TypeDeclaration) _decl).getQualifiedName());
            }

            // store declaration so we don't handle it multiple times
            handledDecls.add((TypeDeclaration) _decl);
       
View Full Code Here


                oms.store(om);
            }

            // @WebService annotation on unknown/unsupported type definition
            else {
                messager.printError(_decl.getPosition(), "found unsupported type of TypeDeclaration:" + _decl.getSimpleName());
            }
        }

        // if an exception or error ocurred log it and return
        catch (Throwable t) {
View Full Code Here

            }
        }

        // if an exception or error ocurred log it and return
        catch (Throwable t) {
            messager.printError(_decl.getPosition(), t.getMessage());
        }
    }
   
    /**
     * @see TwoPhaseAnnotationProcessor
View Full Code Here

          text.append('[').append(error.getLabel()).append("] ");
        }
        text.append(error.getText());

        if (error.getPosition() != null) {
          messager.printError(error.getPosition(), text.toString());
        }
        else {
          messager.printError(text.toString());
        }
      }
View Full Code Here

        if (error.getPosition() != null) {
          messager.printError(error.getPosition(), text.toString());
        }
        else {
          messager.printError(text.toString());
        }
      }

      throw new ModelValidationException();
    }
View Full Code Here

  protected void process(TemplateException e) {
    if (!(e instanceof ModelValidationException)) {
      Messager messager = getMessager();
      StringWriter stackTrace = new StringWriter();
      e.printStackTrace(new PrintWriter(stackTrace));
      messager.printError(stackTrace.toString());
    }

    this.ee = new EnunciateException(e);
  }
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.