blob: 6cc87715414507b30bc322425249d5e3b920ebf0 [file] [log] [blame]
/** Copyright (C) Conformiq Software Ltd.
* All rights reserved.
*
* Created Wed Aug 27 16:49:21 2008.
*
* @file DebugMessageType.java
*
* @author Conformiq Software Ltd.
*
*
*/
package com.conformiq.adaptation.ttcn;
import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
enum DebugMessageType {
Requirement("Logging.Log targeted Requirements",
"mp_log_targeted_requirements", "requirement",
new String[] {
"When this module parameter value is set to true all "
+ "requirements",
"targeted in each test case will be logged.",
"The default value of this module parameter is true." },
new String[] { "requirement:" }, true),
StateOrTransition("Logging.Log targeted States and Transitions",
"mp_log_targeted_states_and_transitions", "state_or_transition",
new String[] {
"When this module parameter value is set to true all states &",
"transitions targeted in each test case will be logged.",
"The default value of this module parameter is true." },
new String[] { "state:", "transition:", "2-transition:" }, true),
Branch("Logging.Log targeted Conditional and Atomic Branches",
"mp_log_targeted_conditional_and_atomic_branches", "branch",
new String[] {
"When this module parameter value is set to true all "
+ "conditional",
"and atomic branches targeted in each test case will be "
+ "logged.",
"The default value of this module parameter is true." },
new String[] { "branch:", "condition:" }, true),
BoundaryValueAnaysis("Logging.Log targeted Boundary Value Analysis",
"mp_log_targeted_boundary_value_analysis", "boundary_value",
new String[] {
"When this module parameter value is set to true all boundary",
"values targeted in each test case will be logged.",
"The default value of this module parameter is true." },
new String[] { "boundary:" }, true),
Method("Logging.Log targeted Methods", "mp_log_targeted_methods", "method",
new String[] { "When this module parameter value is set to true",
"all methods targeted in each test case will be logged.",
"The default value of this module parameter is true." },
new String[] { "method:" }, true);
public static DebugMessageType[] enabledValues()
{
List<DebugMessageType> ret = new LinkedList<DebugMessageType>();
for (DebugMessageType t : values())
{
if (t.enabled)
{
ret.add(t);
}
}
return ret.toArray(new DebugMessageType[0]);
}
DebugMessageType(String XMLPropertyName, String enablingFlag,
String dispatchingEnumItemName, String[] modeuleparComment,
String[] checkpointPrefixes, boolean defaultFlagState)
{
this.XMLPropertyName = XMLPropertyName;
this.enablingFlag = enablingFlag;
this.dispatchingEnumItemName = "e_" + dispatchingEnumItemName;
this.modeuleparComment = modeuleparComment;
this.checkpointPrefixes = new HashSet<String>();
this.defaultFlagState = defaultFlagState;
this.checkpointPrefixes.addAll(Arrays.asList(checkpointPrefixes));
}
public final String XMLPropertyName;
public final String enablingFlag;
public final String dispatchingEnumItemName;
public final String[] modeuleparComment;
public final Set<String> checkpointPrefixes;
public final boolean defaultFlagState;
boolean enabled;
}