hudson.Functions.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(95)

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

Functions.<init>介绍

暂无

代码示例

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

public static void initPageVariables(JellyContext context) {
  StaplerRequest currentRequest = Stapler.getCurrentRequest();
  String rootURL = currentRequest.getContextPath();
  Functions h = new Functions();
  context.setVariable("h", h);
  // The path starts with a "/" character but does not end with a "/" character.
  context.setVariable("rootURL", rootURL);
  /*
    load static resources from the path dedicated to a specific version.
    This "/static/VERSION/abc/def.ghi" path is interpreted by stapler to be
    the same thing as "/abc/def.ghi", but this avoids the stale cache
    problem when the user upgrades to new Jenkins. Stapler also sets a long
    future expiration dates for such static resources.
    see https://wiki.jenkins-ci.org/display/JENKINS/Hyperlinks+in+HTML
   */
  context.setVariable("resURL",rootURL+getResourcePath());
  context.setVariable("imagesURL",rootURL+getResourcePath()+"/images");
  context.setVariable("userAgent", currentRequest.getHeader("User-Agent"));
  IconSet.initPageVariables(context);
}

代码示例来源:origin: stackoverflow.com

String dayNames[]={"lundi","mardi","mercredi","jeudi","vendredi","samedi","dimanche"};
   String nomthNames[]={"janvier","février","mars","avril","mai","juin","juillet","Août","septembre","octobre","novembre","decembre"};
   Calendar date = Calendar.getInstance();
   String dayName = dayNames[date.get(Calendar.DAY_OF_WEEK)];
   String dayMonth = nomthNames[date.get(Calendar.MONTH)];
   lblBonjour.setText("<html><b>Bonjour, "+new Functions().getNomPrenom(myID)+"</b><br>"+
       "Ajourd'hui "+dayName+" "+date.get(Calendar.DATE)+" "+dayMonth+" "+date.get(Calendar.YEAR)+"<br>"+
       "Heure locale: "+date.get(Calendar.HOUR_OF_DAY)+":"+date.get(Calendar.MINUTE) );

代码示例来源:origin: stackoverflow.com

Functions functions = new Functions();
functions.checkConnection(Home.this);

代码示例来源:origin: stackoverflow.com

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.chat_box);// sd

  final Functions function = new Functions();
  final SharedPreferences prefs = PreferenceManager
      .getDefaultSharedPreferences(getBaseContext());
  where = prefs.getString("chat", "null");
  new AsyncTask<String, Void, String>() {
    @Override
    protected String doInBackground(String... args) {
      return function.getInbox(args[0]);
    }

    @Override
    protected void onPostExecute(String result) {
      TextView inbox = (TextView) findViewById(R.id.inbox);
      inbox.setText(result);
    }

  }.execute(where);
}

代码示例来源:origin: stackoverflow.com

public class Increment{

  public static void main(String []args){

    Functions EF = new Functions();

    System.out.println(EF.value());    
    System.out.println(EF.value());    
    System.out.println(EF.value());    
  }
}

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

public static void initPageVariables(JellyContext context) {
  StaplerRequest currentRequest = Stapler.getCurrentRequest();
  String rootURL = currentRequest.getContextPath();
  Functions h = new Functions();
  context.setVariable("h", h);
  // The path starts with a "/" character but does not end with a "/" character.
  context.setVariable("rootURL", rootURL);
  /*
    load static resources from the path dedicated to a specific version.
    This "/static/VERSION/abc/def.ghi" path is interpreted by stapler to be
    the same thing as "/abc/def.ghi", but this avoids the stale cache
    problem when the user upgrades to new Jenkins. Stapler also sets a long
    future expiration dates for such static resources.
    see https://wiki.jenkins-ci.org/display/JENKINS/Hyperlinks+in+HTML
   */
  context.setVariable("resURL",rootURL+getResourcePath());
  context.setVariable("imagesURL",rootURL+getResourcePath()+"/images");
  context.setVariable("userAgent", currentRequest.getHeader("User-Agent"));
  IconSet.initPageVariables(context);
}

相关文章

微信公众号

最新文章

更多