|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ant4eclipse.model.project.EclipseProject
public final class EclipseProject
Encapsultes a project. A project contains a workspace and is represented by a directory in this workspace. A project can have multiple natures and multiple roles.
Constructor Summary | |
---|---|
EclipseProject(Workspace workspace,
java.lang.String projectName)
Creates a new instance of type project. |
Method Summary | |
---|---|
void |
addBuildCommand(BuildCommand command)
Adds the specified build command to the project. |
void |
addLinkedResource(LinkedResource linkedResource)
Adds a new linked resource to the project. |
void |
addNature(ProjectNature nature)
Adds the specified nature to the project. |
void |
addReferencedProject(java.lang.String referencedProject)
|
void |
addRole(AbstractProjectRole role)
Adds the specified role to the EclipseProject. |
boolean |
equals(java.lang.Object o)
|
boolean |
exists()
Returns whether this project exists. |
BuildCommand[] |
getBuildCommands()
Returns the build commands of this project. |
java.io.File |
getChild(java.lang.String path)
Returns the child of this project with the given path. |
java.io.File |
getChild(java.lang.String path,
boolean relative)
Returns the child of this project with the given path. |
java.lang.String |
getComment()
|
CvsProjectRole |
getCvsProjectRole()
Returns the cvs project role. |
java.io.File |
getFolder()
Returns the folder that represents this project. |
JavaProjectRole |
getJavaProjectRole()
Returns the java project role. |
LinkedResource |
getLinkedResource(java.lang.String name)
Returns a specific LinkedResource instance. |
java.lang.String |
getName()
Returns the name of the project |
ProjectNature[] |
getNatures()
Returns the project natures of the project. |
java.lang.String[] |
getReferencedProjects()
Returns a list of all referenced project names. |
AbstractProjectRole |
getRole(java.lang.Class projectRoleClass)
Returns the role of the given type. |
AbstractProjectRole[] |
getRoles()
Returns the roles of this project. |
java.lang.String |
getSpecifiedName()
|
Workspace |
getWorkspace()
Returns the workspace the project belongs to. |
boolean |
hasBuildCommand(BuildCommand command)
Returns whether the specified build command is set or not. |
boolean |
hasBuildCommand(java.lang.String commandName)
Returns whether the build command with the specified name is set or not. |
boolean |
hasChild(java.lang.String path)
Returns whether this project has a child with the given path. |
boolean |
hasCvsProjectRole()
Returns whether a cvs project role is set or not. |
int |
hashCode()
|
boolean |
hasJavaProjectRole()
Returns whether a java project role is set or not. |
boolean |
hasNature(ProjectNature nature)
Returns whether the specified nature is set or not. |
boolean |
hasNature(java.lang.String natureName)
Returns whether the nature with the specified name is set or not. |
boolean |
hasRole(java.lang.Class projectRoleClass)
Returns whether the role of the given type is set or not. |
boolean |
isLinkedResource(java.lang.String name)
Returns true if the supplied name refers to a linked resource. |
void |
setComment(java.lang.String comment)
|
void |
setSpecifiedName(java.lang.String specifiedName)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EclipseProject(Workspace workspace, java.lang.String projectName)
workspace
- the workspaceprojectName
- the name of the projectMethod Detail |
---|
public java.lang.String getSpecifiedName()
public void setSpecifiedName(java.lang.String specifiedName)
specifiedName
- The specifiedName to set.public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment
- The comment to set.public java.lang.String getName()
public java.io.File getFolder()
public boolean exists()
public boolean hasChild(java.lang.String path)
path
- the path of child
public java.io.File getChild(java.lang.String path)
path
- The child which shall be returned.
public java.io.File getChild(java.lang.String path, boolean relative)
path
- The child which shall be returned.relative
- true <=> Create a relative location.
public void addNature(ProjectNature nature)
nature
- the nature to add.public boolean hasNature(java.lang.String natureName)
natureName
-
public boolean hasNature(ProjectNature nature)
nature
-
public ProjectNature[] getNatures()
public void addReferencedProject(java.lang.String referencedProject)
referencedProject
- public java.lang.String[] getReferencedProjects()
public void addRole(AbstractProjectRole role)
role
- Adds the specified role to the EclipseProject.public boolean hasRole(java.lang.Class projectRoleClass)
projectRoleClass
-
public AbstractProjectRole getRole(java.lang.Class projectRoleClass)
projectRoleClass
-
public AbstractProjectRole[] getRoles()
public void addBuildCommand(BuildCommand command)
command
- the specified build command to the project.public boolean hasBuildCommand(java.lang.String commandName)
commandName
-
public boolean hasBuildCommand(BuildCommand command)
command
- The command name that has to be tested.
public BuildCommand[] getBuildCommands()
public void addLinkedResource(LinkedResource linkedResource)
linkedResource
- the linked resource to add.public LinkedResource getLinkedResource(java.lang.String name)
name
- The name of the desired LinkedResource instance.
public boolean isLinkedResource(java.lang.String name)
name
- The name of a potential linked resource.
public Workspace getWorkspace()
public JavaProjectRole getJavaProjectRole()
public boolean hasJavaProjectRole()
public CvsProjectRole getCvsProjectRole()
public boolean hasCvsProjectRole()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |