org.schmant.project.java
Class JavaProjectClasspathDecorator

java.lang.Object
  extended by org.schmant.support.AbstractArgumentChecker
      extended by org.schmant.project.java.JavaProjectClasspathDecorator
All Implemented Interfaces:
PathDecorator<JavaProjectClasspathDecorator,Object>, TaskDecorator, ValidatingDecorator

public class JavaProjectClasspathDecorator
extends AbstractArgumentChecker
implements PathDecorator<JavaProjectClasspathDecorator,Object>

The JavaProjectClasspathDecorator is a PathDecorator that is used for setting the build classpath for building a JavaProject. It uses a JavaProjectDependencies to get the class directories for projects that the project to build depends on.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
JavaProjectClasspathDecorator()
           
 
Method Summary
 JavaProjectDependencies getDependencies()
          Get the dependencies object.
 List<Object> getPathEntries()
          Get the path entries.
 JavaProject getProject()
          Get the project to build.
 JavaProjectClasspathDecorator setDependencies(JavaProjectDependencies deps)
          Set the dependencies object.
 JavaProjectClasspathDecorator setProject(JavaProject p)
          Set the project to build.
 void validate(Report r, Collection<String> errs)
          Validate the task decorator and add errors to errs.
 
Methods inherited from class org.schmant.support.AbstractArgumentChecker
check, check, check, check
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaProjectClasspathDecorator

public JavaProjectClasspathDecorator()
Method Detail

setProject

public JavaProjectClasspathDecorator setProject(JavaProject p)
Set the project to build.

Parameters:
p - The project.
Returns:
this

getProject

public JavaProject getProject()
Get the project to build.

Returns:
The project to build.

setDependencies

public JavaProjectClasspathDecorator setDependencies(JavaProjectDependencies deps)
Set the dependencies object.

Parameters:
deps - The dependencies object.
Returns:
this

getDependencies

public JavaProjectDependencies getDependencies()
Get the dependencies object.

Returns:
The dependencies object.

validate

public void validate(Report r,
                     Collection<String> errs)
Description copied from interface: ValidatingDecorator
Validate the task decorator and add errors to errs.

Specified by:
validate in interface ValidatingDecorator
Parameters:
r - The current Report. Just like for AbstractTask.validate(Report), no validation errors should be logged to this. (They are logged later on.)
errs - A collection of error messages. Add validation error messages to this.

getPathEntries

public List<Object> getPathEntries()
Description copied from interface: PathDecorator
Get the path entries. It is up to the using object to decide how the objects returned from this method should be interpreted.

Specified by:
getPathEntries in interface PathDecorator<JavaProjectClasspathDecorator,Object>
Returns:
The path entries.