Java Code Examples for com.sun.codemodel.internal.JPackage#isUnnamed()

The following examples show how to use com.sun.codemodel.internal.JPackage#isUnnamed() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ZipCodeWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
    String name = fileName;
    if(!pkg.isUnnamed())    name = toDirName(pkg)+name;

    zip.putNextEntry(new ZipEntry(name));
    return filter;
}
 
Example 2
Source File: ProgressCodeWriter.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void report(JPackage pkg, String fileName) {
    if(pkg.isUnnamed()) progress.println(fileName);
    else
        progress.println(
            pkg.name().replace('.',File.separatorChar)
                +File.separatorChar+fileName);
}
 
Example 3
Source File: ZipCodeWriter.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
    String name = fileName;
    if(!pkg.isUnnamed())    name = toDirName(pkg)+name;

    zip.putNextEntry(new ZipEntry(name));
    return filter;
}
 
Example 4
Source File: FilerCodeWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public Writer openSource(JPackage pkg, String fileName) throws IOException {
    String name;
    if(pkg.isUnnamed())
        name = fileName;
    else
        name = pkg.name()+'.'+fileName;

    name = name.substring(0,name.length()-5);   // strip ".java"

    return filer.createSourceFile(name).openWriter();
}
 
Example 5
Source File: ProgressCodeWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void report(JPackage pkg, String fileName) {
    if(pkg.isUnnamed()) progress.println(fileName);
    else
        progress.println(
            pkg.name().replace('.',File.separatorChar)
                +File.separatorChar+fileName);
}
 
Example 6
Source File: ZipCodeWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
    String name = fileName;
    if(!pkg.isUnnamed())    name = toDirName(pkg)+name;

    zip.putNextEntry(new ZipEntry(name));
    return filter;
}
 
Example 7
Source File: FilerCodeWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public Writer openSource(JPackage pkg, String fileName) throws IOException {
    String name;
    if(pkg.isUnnamed())
        name = fileName;
    else
        name = pkg.name()+'.'+fileName;

    name = name.substring(0,name.length()-5);   // strip ".java"

    return filer.createSourceFile(name).openWriter();
}
 
Example 8
Source File: ProgressCodeWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void report(JPackage pkg, String fileName) {
    if(pkg == null || pkg.isUnnamed())
        progress.println(fileName);
    else
        progress.println(
            pkg.name().replace('.',File.separatorChar)
                +File.separatorChar+fileName);
}
 
Example 9
Source File: ProgressCodeWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void report(JPackage pkg, String fileName) {
    if(pkg.isUnnamed()) progress.println(fileName);
    else
        progress.println(
            pkg.name().replace('.',File.separatorChar)
                +File.separatorChar+fileName);
}
 
Example 10
Source File: FilerCodeWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Writer openSource(JPackage pkg, String fileName) throws IOException {
    String name;
    if(pkg.isUnnamed())
        name = fileName;
    else
        name = pkg.name()+'.'+fileName;

    name = name.substring(0,name.length()-5);   // strip ".java"

    return filer.createSourceFile(name).openWriter();
}
 
Example 11
Source File: ZipCodeWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
    String name = fileName;
    if(!pkg.isUnnamed())    name = toDirName(pkg)+name;

    zip.putNextEntry(new ZipEntry(name));
    return filter;
}
 
Example 12
Source File: ProgressCodeWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void report(JPackage pkg, String fileName) {
    if(pkg.isUnnamed()) progress.println(fileName);
    else
        progress.println(
            pkg.name().replace('.',File.separatorChar)
                +File.separatorChar+fileName);
}
 
Example 13
Source File: ZipCodeWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
    String name = fileName;
    if(!pkg.isUnnamed())    name = toDirName(pkg)+name;

    zip.putNextEntry(new ZipEntry(name));
    return filter;
}
 
Example 14
Source File: FilerCodeWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Writer openSource(JPackage pkg, String fileName) throws IOException {
    String name;
    if(pkg.isUnnamed())
        name = fileName;
    else
        name = pkg.name()+'.'+fileName;

    name = name.substring(0,name.length()-5);   // strip ".java"

    return filer.createSourceFile(name).openWriter();
}
 
Example 15
Source File: ProgressCodeWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void report(JPackage pkg, String fileName) {
    if(pkg.isUnnamed()) progress.println(fileName);
    else
        progress.println(
            pkg.name().replace('.',File.separatorChar)
                +File.separatorChar+fileName);
}
 
Example 16
Source File: ZipCodeWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
    String name = fileName;
    if(!pkg.isUnnamed())    name = toDirName(pkg)+name;

    zip.putNextEntry(new ZipEntry(name));
    return filter;
}
 
Example 17
Source File: FilerCodeWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Writer openSource(JPackage pkg, String fileName) throws IOException {
    String name;
    if(pkg.isUnnamed())
        name = fileName;
    else
        name = pkg.name()+'.'+fileName;

    name = name.substring(0,name.length()-5);   // strip ".java"

    return filer.createSourceFile(name).openWriter();
}
 
Example 18
Source File: ProgressCodeWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void report(JPackage pkg, String fileName) {
    if(pkg.isUnnamed()) progress.println(fileName);
    else
        progress.println(
            pkg.name().replace('.',File.separatorChar)
                +File.separatorChar+fileName);
}
 
Example 19
Source File: ZipCodeWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
    String name = fileName;
    if(!pkg.isUnnamed())    name = toDirName(pkg)+name;

    zip.putNextEntry(new ZipEntry(name));
    return filter;
}
 
Example 20
Source File: ZipCodeWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
    final String name = pkg == null || pkg.isUnnamed() ? fileName : toDirName(pkg)+fileName;
    zip.putNextEntry(new ZipEntry(name));
    return filter;
}