/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
// import javax.tools.JavaCompiler;
/**
* Used to generate a "symbol file" representing rt.jar that only
* includes supported or legacy proprietary API. Valid annotation
* processor options:
*
* <dl>
* <dt>com.sun.tools.javac.sym.Jar</dt>
* <dd>Specifies the location of rt.jar.</dd>
* <dt>com.sun.tools.javac.sym.Dest</dt>
* <dd>Specifies the destination directory.</dd>
* </dl>
*
* <p><b>This is NOT part of any API supported by Sun Microsystems.
* If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p>
*
*/
@SupportedAnnotationTypes("*")
return Collections.emptySet();
}
if (!renv.processingOver())
return true;
throw new RuntimeException("Must use -Acom.sun.tools.javac.sym.Jar=LOCATION_OF_JAR");
throw new RuntimeException("Must use -Acom.sun.tools.javac.sym.Dest=LOCATION_OF_JAR");
}
try {
{
// ADD EXTRA DEPENDENCIES HERE:
// if (!new File(path.getName()).equals(new File("rt.jar")))
}
}
// System.out.println(fm.getLocation(StandardLocation.PLATFORM_CLASS_PATH));
// System.out.println("Documented: " + className);
// System.out.println("Legacy proprietary: " + className);
} else {
// System.out.println("Hidden " + className);
continue;
}
// PackageSymbol psym = reader.enterPackage(names.fromString(pckName));
// psym.complete();
}
continue;
}
}
if (false) {
/*
* Following eliminates non-public classes from output,
* but is too aggressive because it also eliminates
* non-public superclasses of public classes, which
* makes the output unusable.
*/
}
} else {
}
}
} catch (IOException ex) {
} catch (CompletionFailure ex) {
} catch (RuntimeException ex) {
}
if (false) {
}
return true;
}
element);
else
}
try {
}
}
throw new RuntimeException(ex);
throw new RuntimeException(ex);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
return SourceVersion.latest();
}
}