Tabnine Logo
PostConstructInfo.<init>
Code IndexAdd Tabnine to your IDE (free)

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

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

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<init>

Popular methods of PostConstructInfo

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • addToBackStack (FragmentTransaction)
    • setRequestProperty (URLConnection)
    • requestLocationUpdates (LocationManager)
    • Font (java.awt)
      The Font class represents fonts, which are used to render text in a visible way. A font provides the
    • FileInputStream (java.io)
      An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
    • BigDecimal (java.math)
      An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
    • Format (java.text)
      The base class for all formats. This is an abstract base class which specifies the protocol for clas
    • Queue (java.util)
      A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
    • Join (org.hibernate.mapping)
    • From CI to AI: The AI layer in your organization
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now