Tabnine Logo
AbstractModelASTCodeBlock.getSingleValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getSingleValue
method
in
org.jenkinsci.plugins.pipeline.modeldefinition.ast.AbstractModelASTCodeBlock

Best Java code snippets using org.jenkinsci.plugins.pipeline.modeldefinition.ast.AbstractModelASTCodeBlock.getSingleValue (Showing top 4 results out of 315)

origin: jenkinsci/pipeline-model-definition-plugin

protected boolean isLiteralSingleArg() {
  return getArgs() != null
      && getSingleValue() != null
      && getSingleValue().isLiteral();
}
origin: org.jenkinsci.plugins/pipeline-model-api

protected boolean isLiteralSingleArg() {
  return getArgs() != null
      && getSingleValue() != null
      && getSingleValue().isLiteral();
}
origin: jenkinsci/pipeline-model-definition-plugin

public String codeBlockAsString() {
  if (getArgs() == null) {
    return null;
  } else if (isLiteralSingleArg()) {
    Object v = getSingleValue().getValue();
    if (v instanceof String) {
      List<String> retList = new ArrayList<>();
      for (String s : v.toString().split("\\r?\\n")) {
        retList.add(s.trim());
      }
      return StringUtils.join(retList, "\n");
    } else {
      return v.toString();
    }
  } else {
    return getArgs().toGroovy();
  }
}
origin: org.jenkinsci.plugins/pipeline-model-api

public String codeBlockAsString() {
  if (getArgs() == null) {
    return null;
  } else if (isLiteralSingleArg()) {
    Object v = getSingleValue().getValue();
    if (v instanceof String) {
      List<String> retList = new ArrayList<>();
      for (String s : v.toString().split("\\r?\\n")) {
        retList.add(s.trim());
      }
      return StringUtils.join(retList, "\n");
    } else {
      return v.toString();
    }
  } else {
    return getArgs().toGroovy();
  }
}
org.jenkinsci.plugins.pipeline.modeldefinition.astAbstractModelASTCodeBlockgetSingleValue

Popular methods of AbstractModelASTCodeBlock

  • codeBlockAsString
  • getArgs
  • getName
  • isLiteralSingleArg
  • setName

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now