Codota Logo
Messager
Code IndexAdd Codota to your IDE (free)

How to use
Messager
in
com.sun.mirror.apt

Best Java code snippets using com.sun.mirror.apt.Messager (Showing top 20 results out of 315)

  • Common ways to obtain Messager
private void myMethod () {
Messager m =
  • Codota IconAnnotationProcessorEnvironment annotationProcessorEnvironment;annotationProcessorEnvironment.getMessager()
  • Smart code suggestions by Codota
}
origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

public void error(SAXParseException exception) {
  messager.printError(exception.getMessage());
  messager.printError(getLocation(exception));
  printDetail(exception);
}
origin: uk.ac.ebi.intact.core/intact-apt

public MockableProcessor(Set<AnnotationTypeDeclaration> atds,
             AnnotationProcessorEnvironment env
) {
  this.atds = atds;
  this.env = env;
  this.env.getMessager().printNotice("Starting annotation process");
}
origin: sun-jaxb/jaxb-xjc

public void warning(SAXParseException exception) {
  messager.printWarning(exception.getMessage());
  messager.printWarning(getLocation(exception));
  printDetail(exception);
}
origin: com.mulesoft.google/google-api-gdata

 env.getTypeDeclaration(Kind.Term.class.getName());
if (kindDecl == null) {
 msg.printError("Unable to find the Kind.Term annotation type");
 return;
  msg.printError(decl.getPosition(),
    "@Kind.Term may only be used to annotate a class");
  continue;
 ClassType classType = (ClassType)typeUtils.getDeclaredType(classDecl);
 if (!typeUtils.isAssignable(classType, declaratorType)) {
  msg.printError(classDecl.getPosition(),
    "Class annotated by @Kind.Term must implement Kind.Adaptor");
  continue;
  msg.printError("Unable to write kind metadata:" + servicePath);
  ioe.printStackTrace();
 } finally {
 msg.printNotice("Wrote kind metadata for " + term + " to " 
   + servicePath);
origin: org.codehaus.enunciate/enunciate-core

 messager.printWarning(warning.getPosition(), text.toString());
 messager.printWarning(text.toString());
messager.printError(error.getPosition(), text.toString());
messager.printError(text.toString());
origin: com.google.gdata/gdata-core-1.0

 env.getTypeDeclaration(Kind.Term.class.getName());
if (kindDecl == null) {
 msg.printError("Unable to find the Kind.Term annotation type");
 return;
  msg.printError(decl.getPosition(),
    "@Kind.Term may only be used to annotate a class");
  continue;
 ClassType classType = (ClassType)typeUtils.getDeclaredType(classDecl);
 if (!typeUtils.isAssignable(classType, declaratorType)) {
  msg.printError(classDecl.getPosition(),
    "Class annotated by @Kind.Term must implement Kind.Adaptor");
  continue;
  msg.printError("Unable to write kind metadata:" + servicePath);
  ioe.printStackTrace();
 } finally {
 msg.printNotice("Wrote kind metadata for " + term + " to " 
   + servicePath);
origin: org.codehaus.enunciate/enunciate-full

for (ValidationMessage warning : validationResult.getWarnings()) {
 if (warning.getPosition() != null) {
  env.getMessager().printWarning(warning.getPosition(), warning.getText());
  env.getMessager().printWarning(warning.getText());
for (ValidationMessage error : validationResult.getErrors()) {
 if (error.getPosition() != null) {
  env.getMessager().printError(error.getPosition(), error.getText());
  env.getMessager().printError(error.getText());
origin: com.google.gdata/gdata-java-client

 env.getTypeDeclaration(Kind.Term.class.getName());
if (kindDecl == null) {
 msg.printError("Unable to find the Kind.Term annotation type");
 return;
  msg.printError(decl.getPosition(),
    "@Kind.Term may only be used to annotate a class");
  continue;
 ClassType classType = (ClassType)typeUtils.getDeclaredType(classDecl);
 if (!typeUtils.isAssignable(classType, declaratorType)) {
  msg.printError(classDecl.getPosition(),
    "Class annotated by @Kind.Term must implement Kind.Adaptor");
  continue;
  msg.printError("Unable to write kind metadata:" + servicePath);
  ioe.printStackTrace();
 } finally {
 msg.printNotice("Wrote kind metadata for " + term + " to " 
   + servicePath);
origin: uk.ac.ebi.intact.core/intact-apt

public PotentialThreatProcessor(Set<AnnotationTypeDeclaration> atds,
  AnnotationProcessorEnvironment env) {
 this.atds = atds;
 this.env = env;
 this.env.getMessager().printNotice("Starting annotation process");
}
origin: sun-jaxb/jaxb-xjc

public void error(SAXParseException exception) {
  messager.printError(exception.getMessage());
  messager.printError(getLocation(exception));
  printDetail(exception);
}
origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

public void warning(SAXParseException exception) {
  messager.printWarning(exception.getMessage());
  messager.printWarning(getLocation(exception));
  printDetail(exception);
}
origin: uk.ac.ebi.intact/intact-apt

public IntactAnnotationProcessor(Set<AnnotationTypeDeclaration> atds,
  AnnotationProcessorEnvironment env) {
 this.atds = atds;
 this.env = env;
 this.env.getMessager().printNotice("Starting annotation process");
}
origin: sun-jaxb/jaxb-xjc

public void fatalError(SAXParseException exception) {
  messager.printError(exception.getMessage());
  messager.printError(getLocation(exception));
  printDetail(exception);
}
origin: uk.ac.ebi.intact.sanity/intact-sanity-commons

public SanityAnnotationProcessor( Set<AnnotationTypeDeclaration> atds, AnnotationProcessorEnvironment env ) {
  this.atds = atds;
  this.env = env;
  this.env.getMessager().printNotice( "Starting annotation process" );
}
origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

public void fatalError(SAXParseException exception) {
  messager.printError(exception.getMessage());
  messager.printError(getLocation(exception));
  printDetail(exception);
}
origin: uk.ac.ebi.intact.sanity/intact-sanity-commons

public void process() {
  SanityRuleVisitor visitor = new SanityRuleVisitor();
  for ( AnnotationTypeDeclaration atd : atds ) {
    env.getMessager().printNotice( "Collecting annotation " + atd );
    Collection<Declaration> decls = env.getDeclarationsAnnotatedWith( atd );
    for ( Declaration decl : decls ) {
      decl.accept( DeclarationVisitors.getDeclarationScanner( visitor, DeclarationVisitors.NO_OP ) );
    }
  }
  List<DeclaredRule> rules = visitor.getRules();
  try {
    File targetDir = createTargetDir();
    File targetFile = new File( targetDir, DeclaredRuleManager.RULES_XML_PATH );
    targetFile.getParentFile().mkdirs();
    env.getMessager().printNotice( "Writing " + rules.size() + " sanity rules to: " + targetFile );
    Writer writer = new FileWriter( targetFile );
    DeclaredRules jaxbRules = new DeclaredRules();
    jaxbRules.getDeclaredRules().addAll( rules );
    DeclaredRuleManager.writeRulesXml( jaxbRules, writer );
    writer.close();
  } catch ( Exception e ) {
    e.printStackTrace();
    throw new SanityRuleException( e );
  }
}
origin: sun-jaxb/jaxb-xjc

  public void error(IllegalAnnotationException e) {
    messager.printError(e.toString());
  }
}
origin: sun-jaxb/jaxb-xjc

env.getMessager().printNotice("Writing "+episodeFile);
model.generateEpisodeFile(new StreamResult(episodeFile));
origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

  public void error(IllegalAnnotationException e) {
    messager.printError(e.toString());
  }
}
origin: uk.ac.ebi.intact/intact-apt

public void process() {
 PotentialThreatVisitor visitor = new PotentialThreatVisitor();
 for (AnnotationTypeDeclaration atd : atds) {
  env.getMessager().printNotice("Collecting annotation "+atd);
  Collection<Declaration> decls = env.getDeclarationsAnnotatedWith(atd);
  for (Declaration decl : decls) {
   decl.accept(DeclarationVisitors.getDeclarationScanner(visitor, DeclarationVisitors.NO_OP));
  }
 }
 try {
  visitor.print();
 } catch (Exception e) {
  e.printStackTrace();
 }
}
com.sun.mirror.aptMessager

Most used methods

  • printError
  • printNotice
  • printWarning

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JOptionPane (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now