com.sun.tools.xjc.Options.fileToInputSource()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(57)

本文整理了Java中com.sun.tools.xjc.Options.fileToInputSource()方法的一些代码示例,展示了Options.fileToInputSource()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.fileToInputSource()方法的具体详情如下:
包路径:com.sun.tools.xjc.Options
类名称:Options
方法名:fileToInputSource

Options.fileToInputSource介绍

暂无

代码示例

代码示例来源:origin: org.glassfish.metro/webservices-tools

/**
 * Adds a new binding file.
 *
 * @param bindFile
 */
public void addBindFile(File bindFile) {
  bindFiles.add(fileToInputSource(bindFile));
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

/**
 * Adds a new binding file.
 */
public void addBindFile( File bindFile ) {
  bindFiles.add(fileToInputSource(bindFile));
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

/**
 * Adds a new binding file.
 *
 * @param bindFile
 */
public void addBindFile(File bindFile) {
  bindFiles.add(fileToInputSource(bindFile));
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

/**
 * Adds a new binding file.
 */
public void addBindFile( File bindFile ) {
  bindFiles.add(fileToInputSource(bindFile));
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Adds a new binding file.
 *
 * @param bindFile
 */
public void addBindFile(File bindFile) {
  bindFiles.add(fileToInputSource(bindFile));
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

public void addGrammar(File source) {
  addGrammar(fileToInputSource(source));
}

代码示例来源:origin: apache/servicemix-bundles

private void addRecursive(File dir, String suffix, List<InputSource> result) {
  File[] files = dir.listFiles();
  if (files == null) return; // work defensively
  for (File f : files) {
    if (f.isDirectory())
      addRecursive(f, suffix, result);
    else if (f.getPath().endsWith(suffix))
      result.add(absolutize(fileToInputSource(f)));
  }
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

public void addGrammar( File source ) {
  addGrammar(fileToInputSource(source));
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

public void addGrammar( File source ) {
  addGrammar(fileToInputSource(source));
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

public void addGrammar(File source) {
  addGrammar(fileToInputSource(source));
}

代码示例来源:origin: apache/servicemix-bundles

public void addGrammar(File source) {
  addGrammar(fileToInputSource(source));
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

private void addRecursive(File dir, String suffix, List<InputSource> result) {
  File[] files = dir.listFiles();
  if (files == null) return; // work defensively
  for (File f : files) {
    if (f.isDirectory())
      addRecursive(f, suffix, result);
    else if (f.getPath().endsWith(suffix))
      result.add(absolutize(fileToInputSource(f)));
  }
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

private void addRecursive(File dir, String suffix, List<InputSource> result) {
  File[] files = dir.listFiles();
  if (files == null) return; // work defensively
  for (File f : files) {
    if (f.isDirectory())
      addRecursive(f, suffix, result);
    else if (f.getPath().endsWith(suffix))
      result.add(absolutize(fileToInputSource(f)));
  }
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

private  void addRecursive( File dir, String suffix, List<InputSource> result ) {
  File[] files = dir.listFiles();
  if(files==null)     return; // work defensively
  for( File f : files ) {
    if(f.isDirectory())
      addRecursive(f,suffix,result);
    else
    if(f.getPath().endsWith(suffix))
      result.add(absolutize(fileToInputSource(f)));
  }
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

private  void addRecursive( File dir, String suffix, List<InputSource> result ) {
  File[] files = dir.listFiles();
  if(files==null)     return; // work defensively
  for( File f : files ) {
    if(f.isDirectory())
      addRecursive(f,suffix,result);
    else
    if(f.getPath().endsWith(suffix))
      result.add(absolutize(fileToInputSource(f)));
  }
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

/**
 * Parses a token to a file (or a set of files)
 * and add them as {@link InputSource} to the specified list.
 *
 * @param suffix If the given token is a directory name, we do a recursive search
 *               and find all files that have the given suffix.
 */
private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException {
  Object src;
  try {
    src = Util.getFileOrURL(name);
  } catch (IOException e) {
    throw new BadCommandLineException(
      Messages.format(Messages.NOT_A_FILE_NOR_URL, name));
  }
  if (src instanceof URL) {
    target.add(absolutize(new InputSource(Util.escapeSpace(((URL) src).toExternalForm()))));
  } else {
    File fsrc = (File) src;
    if (fsrc.isDirectory()) {
      addRecursive(fsrc, suffix, target);
    } else {
      target.add(absolutize(fileToInputSource(fsrc)));
    }
  }
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

/**
 * Parses a token to a file (or a set of files)
 * and add them as {@link InputSource} to the specified list.
 *
 * @param suffix
 *      If the given token is a directory name, we do a recusive search
 *      and find all files that have the given suffix.
 */
private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException {
  Object src;
  try {
    src = Util.getFileOrURL(name);
  } catch (IOException e) {
    throw new BadCommandLineException(
      Messages.format(Messages.NOT_A_FILE_NOR_URL,name));
  }
  if(src instanceof URL) {
    target.add(absolutize(new InputSource(Util.escapeSpace(((URL)src).toExternalForm()))));
  } else {
    File fsrc = (File)src;
    if(fsrc.isDirectory()) {
      addRecursive(fsrc,suffix,target);
    } else {
      target.add(absolutize(fileToInputSource(fsrc)));
    }
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc

/**
 * Parses a token to a file (or a set of files)
 * and add them as {@link InputSource} to the specified list.
 *
 * @param suffix If the given token is a directory name, we do a recursive search
 *               and find all files that have the given suffix.
 */
private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException {
  Object src;
  try {
    src = Util.getFileOrURL(name);
  } catch (IOException e) {
    throw new BadCommandLineException(
      Messages.format(Messages.NOT_A_FILE_NOR_URL, name));
  }
  if (src instanceof URL) {
    target.add(absolutize(new InputSource(Util.escapeSpace(((URL) src).toExternalForm()))));
  } else {
    File fsrc = (File) src;
    if (fsrc.isDirectory()) {
      addRecursive(fsrc, suffix, target);
    } else {
      target.add(absolutize(fileToInputSource(fsrc)));
    }
  }
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

/**
 * Parses a token to a file (or a set of files)
 * and add them as {@link InputSource} to the specified list.
 *
 * @param suffix
 *      If the given token is a directory name, we do a recusive search
 *      and find all files that have the given suffix.
 */
private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException {
  Object src;
  try {
    src = Util.getFileOrURL(name);
  } catch (IOException e) {
    throw new BadCommandLineException(
      Messages.format(Messages.NOT_A_FILE_NOR_URL,name));
  }
  if(src instanceof URL) {
    target.add(absolutize(new InputSource(Util.escapeSpace(((URL)src).toExternalForm()))));
  } else {
    File fsrc = (File)src;
    if(fsrc.isDirectory()) {
      addRecursive(fsrc,suffix,target);
    } else {
      target.add(absolutize(fileToInputSource(fsrc)));
    }
  }
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Parses a token to a file (or a set of files)
 * and add them as {@link InputSource} to the specified list.
 *
 * @param suffix If the given token is a directory name, we do a recursive search
 *               and find all files that have the given suffix.
 */
private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException {
  Object src;
  try {
    src = Util.getFileOrURL(name);
  } catch (IOException e) {
    throw new BadCommandLineException(
      Messages.format(Messages.NOT_A_FILE_NOR_URL, name));
  }
  if (src instanceof URL) {
    target.add(absolutize(new InputSource(Util.escapeSpace(((URL) src).toExternalForm()))));
  } else {
    File fsrc = (File) src;
    if (fsrc.isDirectory()) {
      addRecursive(fsrc, suffix, target);
    } else {
      target.add(absolutize(fileToInputSource(fsrc)));
    }
  }
}

相关文章