hudson.Launcher.inherit()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(140)

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

Launcher.inherit介绍

[英]Expands the list of environment variables by inheriting current env variables.
[中]通过继承当前环境变量展开环境变量列表。

代码示例

代码示例来源:origin: jenkinsci/jenkins

  1. /**
  2. * Expands the list of environment variables by inheriting current env variables.
  3. */
  4. private static EnvVars inherit(@CheckForNull String[] env) {
  5. // convert String[] to Map first
  6. EnvVars m = new EnvVars();
  7. if(env!=null) {
  8. for (String e : env) {
  9. int index = e.indexOf('=');
  10. m.put(e.substring(0,index), e.substring(index+1));
  11. }
  12. }
  13. // then do the inheritance
  14. return inherit(m);
  15. }

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

  1. /**
  2. * Expands the list of environment variables by inheriting current env variables.
  3. */
  4. private static EnvVars inherit(@CheckForNull String[] env) {
  5. // convert String[] to Map first
  6. EnvVars m = new EnvVars();
  7. if(env!=null) {
  8. for (String e : env) {
  9. int index = e.indexOf('=');
  10. m.put(e.substring(0,index), e.substring(index+1));
  11. }
  12. }
  13. // then do the inheritance
  14. return inherit(m);
  15. }

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

  1. /**
  2. * Expands the list of environment variables by inheriting current env variables.
  3. */
  4. private static EnvVars inherit(String[] env) {
  5. // convert String[] to Map first
  6. EnvVars m = new EnvVars();
  7. if(env!=null) {
  8. for (String e : env) {
  9. int index = e.indexOf('=');
  10. m.put(e.substring(0,index), e.substring(index+1));
  11. }
  12. }
  13. // then do the inheritance
  14. return inherit(m);
  15. }

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

  1. /**
  2. * Expands the list of environment variables by inheriting current env variables.
  3. */
  4. private static EnvVars inherit(String[] env) {
  5. // convert String[] to Map first
  6. EnvVars m = new EnvVars();
  7. if(env!=null) {
  8. for (String e : env) {
  9. int index = e.indexOf('=');
  10. m.put(e.substring(0,index), e.substring(index+1));
  11. }
  12. }
  13. // then do the inheritance
  14. return inherit(m);
  15. }

代码示例来源:origin: hudson/hudson-2.x

  1. /**
  2. * Expands the list of environment variables by inheriting current env variables.
  3. */
  4. private static EnvVars inherit(String[] env) {
  5. // convert String[] to Map first
  6. EnvVars m = new EnvVars();
  7. if(env!=null) {
  8. for (String e : env) {
  9. int index = e.indexOf('=');
  10. m.put(e.substring(0,index), e.substring(index+1));
  11. }
  12. }
  13. // then do the inheritance
  14. return inherit(m);
  15. }

代码示例来源:origin: org.eclipse.hudson/hudson-core

  1. /**
  2. * Expands the list of environment variables by inheriting current env
  3. * variables.
  4. */
  5. private static EnvVars inherit(String[] env) {
  6. // convert String[] to Map first
  7. EnvVars m = new EnvVars();
  8. if (env != null) {
  9. for (String e : env) {
  10. int index = e.indexOf('=');
  11. m.put(e.substring(0, index), e.substring(index + 1));
  12. }
  13. }
  14. // then do the inheritance
  15. return inherit(m);
  16. }

相关文章