chapters.onJoran.calculator
Class ComputationAction1

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.core.joran.action.Action
          extended by chapters.onJoran.calculator.ComputationAction1
All Implemented Interfaces:
ContextAware

public class ComputationAction1
extends Action

ComputationAction1 will print the result of the compuration made by children elements but only if the compuration itself is named, that is if the name attribute of the associated computation element is not null. In other words, anonymous computations will not print their result.

Author:
Ceki Gülcü

Field Summary
static String NAME_ATR
           
 
Fields inherited from class ch.qos.logback.core.joran.action.Action
ACTION_CLASS_ATTRIBUTE, CLASS_ATTRIBUTE, FILE_ATTRIBUTE, KEY_ATTRIBUTE, NAME_ATTRIBUTE, PATTERN_ATTRIBUTE, SCOPE_ATTRIBUTE, VALUE_ATTRIBUTE
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
ComputationAction1()
           
 
Method Summary
 void begin(InterpretationContext ec, String name, Attributes attributes)
          Store the value of the name attribute for future use.
 void end(InterpretationContext ec, String name)
          Children elements have been processed.
 
Methods inherited from class ch.qos.logback.core.joran.action.Action
body, getColumnNumber, getLineColStr, getLineNumber, toString
 
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_ATR

public static final String NAME_ATR
See Also:
Constant Field Values
Constructor Detail

ComputationAction1

public ComputationAction1()
Method Detail

begin

public void begin(InterpretationContext ec,
                  String name,
                  Attributes attributes)
Store the value of the name attribute for future use.

Specified by:
begin in class Action

end

public void end(InterpretationContext ec,
                String name)
Children elements have been processed. The sesults should be an integer placed at the top of the execution stack. This value will be printed on the console but only if the action is named. Anonymous computation will not print their result.

Specified by:
end in class Action


Copyright © 2005-2013 QOS.ch. All Rights Reserved.