FileDocCategorySizeDatePackage
emmaTask.javaAPI DocAndroid 1.5 API3379Wed May 06 22:41:16 BST 2009com.vladium.emma

emmaTask

public final class emmaTask extends com.vladium.emma.ant.SuppressableTask
author
Vlad Roubtsov, (C) 2003

Fields Summary
private final List
m_tasks
Constructors Summary
public emmaTask()

        m_tasks = new ArrayList ();
    
Methods Summary
protected com.vladium.emma.ant.NestedTaskaddTask(com.vladium.emma.ant.NestedTask task, java.lang.String pseudoName)

        initTask (task, pseudoName);
        
        m_tasks.add (task);
        return task;
    
public com.vladium.emma.ant.NestedTaskcreateInstr()

        return addTask (new instrTask (this), getNestedTaskName ("instr"));
    
public com.vladium.emma.ant.NestedTaskcreateMerge()

        return addTask (new mergeTask (this), getNestedTaskName ("merge"));
    
public com.vladium.emma.ant.NestedTaskcreateReport()

        return addTask (new reportTask (this), getNestedTaskName ("report"));
    
public synchronized voidexecute()

        log (IAppConstants.APP_VERBOSE_BUILD_ID, Project.MSG_VERBOSE);
        
        if (isEnabled ())
        {
            while (! m_tasks.isEmpty ())
            {
                final NestedTask task = (NestedTask) m_tasks.remove (0);
                
                final String name = getTaskName ();
                try
                {
                    setTaskName (task.getTaskName ());
                    
                    task.execute ();
                }
                finally
                {
                    setTaskName (name);
                }
            }
        }
    
protected java.lang.StringgetNestedTaskName(java.lang.String subname)

        return getTaskName ().concat (".").concat (subname);
    
protected voidinitTask(com.vladium.emma.ant.NestedTask task, java.lang.String pseudoName)

        task.setTaskName (pseudoName);
        task.setProject (getProject ());
        task.setLocation (getLocation ());
        task.setOwningTarget (getOwningTarget ());
        
        task.init ();