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

How to use
Completion
in
javax.annotation.processing

Best Java code snippets using javax.annotation.processing.Completion (Showing top 5 results out of 315)

  • Common ways to obtain Completion
private void myMethod () {
Completion c =
  • Codota IconString value;String str;new SimpleCompletion(value, str)
  • Codota IconString value;String message;new SimpleCompletion(value, message)
  • Smart code suggestions by Codota
}
origin: org.juzu/juzu-core

 public int compare(Completion o1, Completion o2) {
  return o1.getValue().compareTo(o2.getValue());
 }
};
origin: org.netbeans.modules/org-netbeans-modules-java-completion

private void addAttributeValues(Env env, Element element, AnnotationMirror annotation, ExecutableElement member) throws IOException {
  CompilationController controller = env.getController();
  TreeUtilities tu = controller.getTreeUtilities();
  ElementUtilities eu = controller.getElementUtilities();
  for (javax.annotation.processing.Completion completion : SourceUtils.getAttributeValueCompletions(controller, element, annotation, member, env.getPrefix())) {
    String value = completion.getValue().trim();
    if (value.length() > 0 && startsWith(env, value)) {
      TypeMirror type = member.getReturnType();
      TypeElement typeElement = null;
      while (type.getKind() == TypeKind.ARRAY) {
        type = ((ArrayType) type).getComponentType();
      }
      if (type.getKind() == TypeKind.DECLARED) {
        CharSequence fqn = ((TypeElement) ((DeclaredType) type).asElement()).getQualifiedName();
        if (JAVA_LANG_CLASS.contentEquals(fqn)) {
          String name = value.endsWith(".class") ? value.substring(0, value.length() - 6) : value; //NOI18N
          TypeMirror tm = tu.parseType(name, eu.outermostTypeElement(element));
          typeElement = tm != null && tm.getKind() == TypeKind.DECLARED ? (TypeElement) ((DeclaredType) tm).asElement() : null;
          if (typeElement != null && startsWith(env, typeElement.getSimpleName().toString())) {
            env.addToExcludes(typeElement);
          }
        }
      }
      results.add(itemFactory.createAttributeValueItem(env.getController(), value, completion.getMessage(), typeElement, anchorOffset, env.getReferencesCount()));
    }
  }
}
origin: juzu/juzu

 public int compare(Completion o1, Completion o2) {
  return o1.getValue().compareTo(o2.getValue());
 }
};
origin: juzu/juzu

 @Override
 protected void doProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
  if (count.getAndIncrement() == 0) {
   ElementHandle.Field index = ElementHandle.Field.create("plugin.template.completion.A", "index");
   VariableElement indexElt = index.get(processingEnv);
   AnnotationMirror pathAnn = indexElt.getAnnotationMirrors().get(0);
   TypeElement annotationTypeElement = (TypeElement)pathAnn.getAnnotationType().asElement();
   ExecutableElement value = (ExecutableElement)annotationTypeElement.getEnclosedElements().get(0);
   for (Completion completion : getCompletions(indexElt, pathAnn, value, test[0])) {
    completions.add(completion.getValue());
   }
  }
 }
});
origin: org.juzu/juzu-core

 @Override
 protected void doProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
  if (count.getAndIncrement() == 0) {
   ElementHandle.Field index = ElementHandle.Field.create("plugin.template.completion.A", "index");
   VariableElement indexElt = index.get(processingEnv);
   AnnotationMirror pathAnn = indexElt.getAnnotationMirrors().get(0);
   TypeElement annotationTypeElement = (TypeElement)pathAnn.getAnnotationType().asElement();
   ExecutableElement value = (ExecutableElement)annotationTypeElement.getEnclosedElements().get(0);
   for (Completion completion : getCompletions(indexElt, pathAnn, value, test[0])) {
    completions.add(completion.getValue());
   }
  }
 }
});
javax.annotation.processingCompletion

Javadoc

A suggested Processor#getCompletions for an annotation. A completion is text meant to be inserted into a program as part of an annotation.

Most used methods

  • getValue
    Returns the text of the suggested completion.
  • getMessage
    Returns an informative message about the completion.

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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