com.sun.tools.internal.ws.processor.generator.GeneratorException Java Examples

The following examples show how to use com.sun.tools.internal.ws.processor.generator.GeneratorException. 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: DirectoryUtil.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void ensureDirectory(File dir) throws GeneratorException {
    if (!dir.exists()) {
        boolean created = dir.mkdirs();
        if (!created || !dir.exists()) {
            throw new GeneratorException("generator.cannot.create.dir",
                dir.getAbsolutePath());
        }
    }
}
 
Example #2
Source File: IndentingWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void p(String s) throws IOException {
        /*
        int tabCount = 0;
        for (int i = 0; i < s.length(); ++i) {
            if (s.charAt(i) == '\t') {
                ++tabCount;
                indentIn();
            }
        }

        String printStr = s.substring(tabCount);
         */
        boolean canEncode = true;

        //bug fix: 4839636
        try{
            if(!canEncode(s)) {
                canEncode = false;
            }
        } catch (Throwable t) {

            // there was some exception, what should we do?
            // lets ignore it for now and proceed with the code generation!
        }

        if(!canEncode) {
            throw new GeneratorException(
                "generator.indentingwriter.charset.cantencode", s);
        }
        write(s);
/*
        while (tabCount-- > 0) {
            indentOut();
        }
 */
    }
 
Example #3
Source File: DirectoryUtil.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static void ensureDirectory(File dir) throws GeneratorException {
    if (!dir.exists()) {
        boolean created = dir.mkdirs();
        if (!created || !dir.exists()) {
            throw new GeneratorException("generator.cannot.create.dir",
                dir.getAbsolutePath());
        }
    }
}
 
Example #4
Source File: IndentingWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void p(String s) throws IOException {
        /*
        int tabCount = 0;
        for (int i = 0; i < s.length(); ++i) {
            if (s.charAt(i) == '\t') {
                ++tabCount;
                indentIn();
            }
        }

        String printStr = s.substring(tabCount);
         */
        boolean canEncode = true;

        //bug fix: 4839636
        try{
            if(!canEncode(s)) {
                canEncode = false;
            }
        } catch (Throwable t) {

            // there was some exception, what should we do?
            // lets ignore it for now and proceed with the code generation!
        }

        if(!canEncode) {
            throw new GeneratorException(
                "generator.indentingwriter.charset.cantencode", s);
        }
        write(s);
/*
        while (tabCount-- > 0) {
            indentOut();
        }
 */
    }
 
Example #5
Source File: DirectoryUtil.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static void ensureDirectory(File dir) throws GeneratorException {
    if (!dir.exists()) {
        boolean created = dir.mkdirs();
        if (!created || !dir.exists()) {
            throw new GeneratorException("generator.cannot.create.dir",
                dir.getAbsolutePath());
        }
    }
}
 
Example #6
Source File: IndentingWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void p(String s) throws IOException {
        /*
        int tabCount = 0;
        for (int i = 0; i < s.length(); ++i) {
            if (s.charAt(i) == '\t') {
                ++tabCount;
                indentIn();
            }
        }

        String printStr = s.substring(tabCount);
         */
        boolean canEncode = true;

        //bug fix: 4839636
        try{
            if(!canEncode(s)) {
                canEncode = false;
            }
        } catch (Throwable t) {

            // there was some exception, what should we do?
            // lets ignore it for now and proceed with the code generation!
        }

        if(!canEncode) {
            throw new GeneratorException(
                "generator.indentingwriter.charset.cantencode", s);
        }
        write(s);
/*
        while (tabCount-- > 0) {
            indentOut();
        }
 */
    }
 
Example #7
Source File: DirectoryUtil.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static void ensureDirectory(File dir) throws GeneratorException {
    if (!dir.exists()) {
        boolean created = dir.mkdirs();
        if (!created || !dir.exists()) {
            throw new GeneratorException("generator.cannot.create.dir",
                dir.getAbsolutePath());
        }
    }
}
 
Example #8
Source File: IndentingWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void p(String s) throws IOException {
        /*
        int tabCount = 0;
        for (int i = 0; i < s.length(); ++i) {
            if (s.charAt(i) == '\t') {
                ++tabCount;
                indentIn();
            }
        }

        String printStr = s.substring(tabCount);
         */
        boolean canEncode = true;

        //bug fix: 4839636
        try{
            if(!canEncode(s)) {
                canEncode = false;
            }
        } catch (Throwable t) {

            // there was some exception, what should we do?
            // lets ignore it for now and proceed with the code generation!
        }

        if(!canEncode) {
            throw new GeneratorException(
                "generator.indentingwriter.charset.cantencode", s);
        }
        write(s);
/*
        while (tabCount-- > 0) {
            indentOut();
        }
 */
    }
 
Example #9
Source File: DirectoryUtil.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static void ensureDirectory(File dir) throws GeneratorException {
    if (!dir.exists()) {
        boolean created = dir.mkdirs();
        if (!created || !dir.exists()) {
            throw new GeneratorException("generator.cannot.create.dir",
                dir.getAbsolutePath());
        }
    }
}
 
Example #10
Source File: IndentingWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void p(String s) throws IOException {
        /*
        int tabCount = 0;
        for (int i = 0; i < s.length(); ++i) {
            if (s.charAt(i) == '\t') {
                ++tabCount;
                indentIn();
            }
        }

        String printStr = s.substring(tabCount);
         */
        boolean canEncode = true;

        //bug fix: 4839636
        try{
            if(!canEncode(s)) {
                canEncode = false;
            }
        } catch (Throwable t) {

            // there was some exception, what should we do?
            // lets ignore it for now and proceed with the code generation!
        }

        if(!canEncode) {
            throw new GeneratorException(
                "generator.indentingwriter.charset.cantencode", s);
        }
        write(s);
/*
        while (tabCount-- > 0) {
            indentOut();
        }
 */
    }
 
Example #11
Source File: DirectoryUtil.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static void ensureDirectory(File dir) throws GeneratorException {
    if (!dir.exists()) {
        boolean created = dir.mkdirs();
        if (!created || !dir.exists()) {
            throw new GeneratorException("generator.cannot.create.dir",
                dir.getAbsolutePath());
        }
    }
}
 
Example #12
Source File: IndentingWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void p(String s) throws IOException {
        /*
        int tabCount = 0;
        for (int i = 0; i < s.length(); ++i) {
            if (s.charAt(i) == '\t') {
                ++tabCount;
                indentIn();
            }
        }

        String printStr = s.substring(tabCount);
         */
        boolean canEncode = true;

        //bug fix: 4839636
        try{
            if(!canEncode(s)) {
                canEncode = false;
            }
        } catch (Throwable t) {

            // there was some exception, what should we do?
            // lets ignore it for now and proceed with the code generation!
        }

        if(!canEncode) {
            throw new GeneratorException(
                "generator.indentingwriter.charset.cantencode", s);
        }
        write(s);
/*
        while (tabCount-- > 0) {
            indentOut();
        }
 */
    }
 
Example #13
Source File: DirectoryUtil.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private static void ensureDirectory(File dir) throws GeneratorException {
    if (!dir.exists()) {
        boolean created = dir.mkdirs();
        if (!created || !dir.exists()) {
            throw new GeneratorException("generator.cannot.create.dir",
                dir.getAbsolutePath());
        }
    }
}
 
Example #14
Source File: IndentingWriter.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void p(String s) throws IOException {
        /*
        int tabCount = 0;
        for (int i = 0; i < s.length(); ++i) {
            if (s.charAt(i) == '\t') {
                ++tabCount;
                indentIn();
            }
        }

        String printStr = s.substring(tabCount);
         */
        boolean canEncode = true;

        //bug fix: 4839636
        try{
            if(!canEncode(s)) {
                canEncode = false;
            }
        } catch (Throwable t) {

            // there was some exception, what should we do?
            // lets ignore it for now and proceed with the code generation!
        }

        if(!canEncode) {
            throw new GeneratorException(
                "generator.indentingwriter.charset.cantencode", s);
        }
        write(s);
/*
        while (tabCount-- > 0) {
            indentOut();
        }
 */
    }
 
Example #15
Source File: DirectoryUtil.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void ensureDirectory(File dir) throws GeneratorException {
    if (!dir.exists()) {
        boolean created = dir.mkdirs();
        if (!created || !dir.exists()) {
            throw new GeneratorException("generator.cannot.create.dir",
                dir.getAbsolutePath());
        }
    }
}
 
Example #16
Source File: IndentingWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void p(String s) throws IOException {
        /*
        int tabCount = 0;
        for (int i = 0; i < s.length(); ++i) {
            if (s.charAt(i) == '\t') {
                ++tabCount;
                indentIn();
            }
        }

        String printStr = s.substring(tabCount);
         */
        boolean canEncode = true;

        //bug fix: 4839636
        try{
            if(!canEncode(s)) {
                canEncode = false;
            }
        } catch (Throwable t) {

            // there was some exception, what should we do?
            // lets ignore it for now and proceed with the code generation!
        }

        if(!canEncode) {
            throw new GeneratorException(
                "generator.indentingwriter.charset.cantencode", s);
        }
        write(s);
/*
        while (tabCount-- > 0) {
            indentOut();
        }
 */
    }