Browse Source

Made tasks receive contexts directly rather than through Contextualizable interface as all tasks will most likely use the context in soem fashion

Also made getName protected again


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270838 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
4cd91bc229
1 changed files with 4 additions and 5 deletions
  1. +4
    -5
      proposal/myrmidon/src/java/org/apache/myrmidon/api/AbstractTask.java

+ 4
- 5
proposal/myrmidon/src/java/org/apache/myrmidon/api/AbstractTask.java View File

@@ -20,7 +20,7 @@ import org.apache.avalon.framework.logger.AbstractLogEnabled;
*/ */
public abstract class AbstractTask public abstract class AbstractTask
extends AbstractLogEnabled extends AbstractLogEnabled
implements Task, Contextualizable
implements Task
{ {
///Variable to hold context for use by sub-classes ///Variable to hold context for use by sub-classes
private TaskContext m_context; private TaskContext m_context;
@@ -30,9 +30,9 @@ public abstract class AbstractTask
* *
* @param context the context * @param context the context
*/ */
public void contextualize( final Context context )
public void contextualize( final TaskContext context )
{ {
m_context = (TaskContext)context;
m_context = context;
} }


/** /**
@@ -62,8 +62,7 @@ public abstract class AbstractTask
return getContext().get( key ); return getContext().get( key );
} }


//Will be made protected in the future
public final String getName()
protected final String getName()
{ {
return getContext().getName(); return getContext().getName();
} }


Loading…
Cancel
Save