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

How to use
PostConstructInfo
in
org.jboss.gwt.elemento.processor.context

Best Java code snippets using org.jboss.gwt.elemento.processor.context.PostConstructInfo (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: hal/elemento

private List<PostConstructInfo> processPostConstruct(TypeElement type) {
  List<PostConstructInfo> postConstructs = new ArrayList<>();
  ElementFilter.methodsIn(type.getEnclosedElements()).stream()
      .filter(method -> MoreElements.isAnnotationPresent(method, PostConstruct.class))
      .forEach(method -> {
        // verify method
        if (method.getModifiers().contains(Modifier.PRIVATE)) {
          abortWithError(method, "@%s method must not be private", PostConstruct.class.getSimpleName());
        }
        if (method.getModifiers().contains(Modifier.STATIC)) {
          abortWithError(method, "@%s method must not be static", PostConstruct.class.getSimpleName());
        }
        if (!method.getReturnType().equals(typeUtils.getNoType(TypeKind.VOID))) {
          abortWithError(method, "@%s method must return void", PostConstruct.class.getSimpleName());
        }
        if (!method.getParameters().isEmpty()) {
          abortWithError(method, "@%s method must not have parameters",
              PostConstruct.class.getSimpleName());
        }
        postConstructs.add(new PostConstructInfo(method.getSimpleName().toString()));
      });
  if (postConstructs.size() > 1) {
    warning(type, "%d methods annotated with @%s found. Order is not guaranteed!", postConstructs.size(),
        PostConstruct.class.getSimpleName());
  }
  return postConstructs;
}
origin: org.jboss.gwt.elemento/elemento-template-processor

private List<PostConstructInfo> processPostConstruct(TypeElement type) {
  List<PostConstructInfo> postConstructs = new ArrayList<>();
  ElementFilter.methodsIn(type.getEnclosedElements()).stream()
      .filter(method -> MoreElements.isAnnotationPresent(method, PostConstruct.class))
      .forEach(method -> {
        // verify method
        if (method.getModifiers().contains(Modifier.PRIVATE)) {
          abortWithError(method, "@%s method must not be private", PostConstruct.class.getSimpleName());
        }
        if (method.getModifiers().contains(Modifier.STATIC)) {
          abortWithError(method, "@%s method must not be static", PostConstruct.class.getSimpleName());
        }
        if (!method.getReturnType().equals(typeUtils.getNoType(TypeKind.VOID))) {
          abortWithError(method, "@%s method must return void", PostConstruct.class.getSimpleName());
        }
        if (!method.getParameters().isEmpty()) {
          abortWithError(method, "@%s method must not have parameters",
              PostConstruct.class.getSimpleName());
        }
        postConstructs.add(new PostConstructInfo(method.getSimpleName().toString()));
      });
  if (postConstructs.size() > 1) {
    warning(type, "%d methods annotated with @%s found. Order is not guaranteed!", postConstructs.size(),
        PostConstruct.class.getSimpleName());
  }
  return postConstructs;
}
origin: org.jboss.gwt.elemento/elemento-template

private List<PostConstructInfo> processPostConstruct(TypeElement type) {
  List<PostConstructInfo> postConstructs = new ArrayList<>();
  ElementFilter.methodsIn(type.getEnclosedElements()).stream()
      .filter(method -> MoreElements.isAnnotationPresent(method, PostConstruct.class))
      .forEach(method -> {
        // verify method
        if (method.getModifiers().contains(Modifier.PRIVATE)) {
          abortWithError(method, "@%s method must not be private", PostConstruct.class.getSimpleName());
        }
        if (method.getModifiers().contains(Modifier.STATIC)) {
          abortWithError(method, "@%s method must not be static", PostConstruct.class.getSimpleName());
        }
        if (!method.getReturnType().equals(typeUtils.getNoType(TypeKind.VOID))) {
          abortWithError(method, "@%s method must return void", PostConstruct.class.getSimpleName());
        }
        if (!method.getParameters().isEmpty()) {
          abortWithError(method, "@%s method must not have parameters",
              PostConstruct.class.getSimpleName());
        }
        postConstructs.add(new PostConstructInfo(method.getSimpleName().toString()));
      });
  if (postConstructs.size() > 1) {
    warning(type, "%d methods annotated with @%s found. Order is not guaranteed!", postConstructs.size(),
        PostConstruct.class.getSimpleName());
  }
  return postConstructs;
}
org.jboss.gwt.elemento.processor.contextPostConstructInfo

Most used methods

  • <init>

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
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