Codota Logo
AstPropertyNode.getPropertyName
Code IndexAdd Codota to your IDE (free)

How to use
getPropertyName
method
in
org.kaazing.k3po.lang.internal.ast.AstPropertyNode

Best Java code snippets using org.kaazing.k3po.lang.internal.ast.AstPropertyNode.getPropertyName (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: k3po/k3po

@Override
protected void describe(StringBuilder buf) {
  super.describe(buf);
  buf.append(format("property %s %s\n", getPropertyName(), getPropertyValue()));
}
origin: k3po/k3po

private String injectOverridenProperties(String aggregatedScript, List<String> scriptProperties)
    throws Exception, ScriptParseException {
  ScriptParserImpl parser = new ScriptParserImpl();
  for (String propertyToInject : scriptProperties) {
    String propertyName = parser.parseWithStrategy(propertyToInject, PROPERTY_NODE).getPropertyName();
    StringBuilder replacementScript = new StringBuilder();
    Pattern pattern = Pattern.compile("property\\s+" + propertyName + "\\s+.+");
    boolean matchFound = false;
    for (String scriptLine : aggregatedScript.split("\\r?\\n")) {
      if (pattern.matcher(scriptLine).matches()) {
        matchFound = true;
        replacementScript.append(propertyToInject + "\n");
      } else {
        replacementScript.append(scriptLine + "\n");
      }
    }
    if (!matchFound) {
      String errorMsg = "Received " + propertyToInject + " in PREPARE but found no where to substitute it";
      LOGGER.error(errorMsg);
      throw new Exception(errorMsg);
    }
    aggregatedScript = replacementScript.toString();
  }
  return aggregatedScript;
}
origin: k3po/k3po

@Override
public Configuration visit(AstPropertyNode propertyNode, State state) {
  String propertyName = propertyNode.getPropertyName();
  Object value = propertyNode.resolve();
  if (value instanceof AutoCloseable) {
    state.configuration.getResources().add((AutoCloseable) value);
  }
  if (LOGGER.isDebugEnabled()) {
    Object formatValue = (value instanceof byte[]) ? AstLiteralBytesValue.toString((byte[]) value) : value;
    LOGGER.debug(format("Setting value for ${%s} to %s", propertyName, formatValue));
  }
  return state.configuration;
}
org.kaazing.k3po.lang.internal.astAstPropertyNodegetPropertyName

Popular methods of AstPropertyNode

  • <init>
  • accept
  • describe
  • equalTo
  • getPropertyValue
  • getRegionInfo
  • resolve
  • setEnvironment
  • setPropertyName
  • setPropertyValue
  • setRegionInfo
  • setRegionInfo

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • Menu (java.awt)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Runner (org.openjdk.jmh.runner)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now