public boolean generateImplementation(TypeElement typeElement) {
    if (options.translateBootclasspathFiles()) {
      return true;
    }
    String className = elementUtil.getBinaryName(typeElement).replace('.', '/');
    if (!className.startsWith("javax/annotation/")) {
      return true;
    }
    String resourcePath = className.replace('.', '/') + ".class";
    return jreEmulLoader.findResource(resourcePath) == null;
  }
public boolean generateImplementation ( TypeElement typeElement ) { if ( options . translateBootclasspathFiles ( ) ) { return true ; } String className = elementUtil . getBinaryName ( typeElement ) . replace ( '.' , '/' ) ; if ( ! className . startsWith ( "javax/annotation/" ) ) { return true ; } String resourcePath = className . replace ( '.' , '/' ) + ".class" ; return jreEmulLoader . findResource ( resourcePath ) == null ; }
Returns true if an implementation for a type element should be generated.
Normally this is true, but in Java 8 a few interfaces from JSR 250
(https://jcp.org/en/jsr/detail?id=250) were added, causing duplicate
symbol link errors when building an app that uses the other JSR 250
annotations. javax.annotation defined on the bootclasspath are therefore
ignored, since translating them won't cause link errors later.
<p>
If the <code>-Xtranslate-bootclasspath</code> flag is specified
(normally only when building the jre_emul libraries), then types
are always generated.