Java 类ch.qos.logback.core.spi.PropertyContainer 实例源码

项目:bartleby    文件:PropertyEvalScriptBuilder.java   
public Condition build(String script) throws IllegalAccessException,
        CompileException,
        InstantiationException,
        SecurityException, NoSuchMethodException, IllegalArgumentException,
        InvocationTargetException {

  ClassBodyEvaluator cbe = new ClassBodyEvaluator();
  cbe.setImplementedInterfaces(new Class[]{Condition.class});
  cbe.setExtendedClass(PropertyWrapperForScripts.class);
  cbe.setParentClassLoader(ClassBodyEvaluator.class.getClassLoader());
  cbe.cook(SCRIPT_PREFIX + script + SCRIPT_SUFFIX);

  Class<?> clazz = cbe.getClazz();
  Condition instance = (Condition) clazz.newInstance();
  Method setMapMethod = clazz.getMethod("setPropertyContainers", PropertyContainer.class, PropertyContainer.class);
  setMapMethod.invoke(instance, localPropContainer, context);

  return instance;
}
项目:bartleby    文件:OptionHelper.java   
public static String propertyLookup(String key, PropertyContainer pc1,
                                    PropertyContainer pc2) {
  String value = null;
  // first try the props passed as parameter
  value = pc1.getProperty(key);

  // then try  the pc2
  if (value == null && pc2 != null) {
    value = pc2.getProperty(key);
  }
  // then try in System properties
  if (value == null) {
    value = getSystemProperty(key, null);
  }
  if (value == null) {
    value = getEnv(key);
  }
  return value;
}
项目:bartleby    文件:OptionHelper.java   
/**
 * See  http://logback.qos.ch/manual/configuration.html#variableSubstitution
 */
public static String substVars(String input, PropertyContainer pc0, PropertyContainer pc1) {
  try {
    return NodeToStringTransformer.substituteVariable(input, pc0, pc1);
  } catch (ScanException e) {
    throw new IllegalArgumentException("Failed to parse input [" + input + "]", e);
  }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:LogbackConfigurator.java   
public PropertyContainer getContext() {
    return this.context;
}
项目:spring-boot-concourse    文件:LogbackConfigurator.java   
public PropertyContainer getContext() {
    return this.context;
}
项目:bartleby    文件:NodeToStringTransformer.java   
public NodeToStringTransformer(Node node, PropertyContainer propertyContainer0, PropertyContainer propertyContainer1) {
  this.node = node;
  this.propertyContainer0 = propertyContainer0;
  this.propertyContainer1 = propertyContainer1;
}
项目:bartleby    文件:NodeToStringTransformer.java   
public NodeToStringTransformer(Node node, PropertyContainer propertyContainer0) {
  this(node, propertyContainer0, null);
}
项目:bartleby    文件:NodeToStringTransformer.java   
public static String substituteVariable(String input, PropertyContainer pc0, PropertyContainer pc1) throws ScanException {
  Node node = tokenizeAndParseString(input);
  NodeToStringTransformer nodeToStringTransformer = new NodeToStringTransformer(node, pc0, pc1);
  return nodeToStringTransformer.transform();
}
项目:bartleby    文件:PropertyEvalScriptBuilder.java   
PropertyEvalScriptBuilder(PropertyContainer localPropContainer) {
  this.localPropContainer = localPropContainer;
}
项目:bartleby    文件:PropertyWrapperForScripts.java   
public void setPropertyContainers(PropertyContainer local, PropertyContainer context) {
  this.local = local;
  this.context = context;
}
项目:bartleby    文件:OptionHelper.java   
/**
 * @see #substVars(String, PropertyContainer, PropertyContainer)
 */
public static String substVars(String val, PropertyContainer pc1) {
  return substVars(val, pc1, null);
}
项目:contestparser    文件:LogbackConfigurator.java   
public PropertyContainer getContext() {
    return this.context;
}