org.apache.tools.ant.taskdefs.optional.dotnet

Class DotnetResource


public class DotnetResource
extends java.lang.Object

Used by DotnetCompile to name resources. Could be upgraded to a datatype in the distant future. A resource maps to /res:file,name

Method Summary

void
addFileset(FileSet fileset)
Adds a resource file set.
File
getFile()
The file resource.
String
getName()
The name of the resource.
String
getNamespace()
Filesets root namespace.
void
getParameters(Project p, NetCommand command, boolean csharpStyle)
build the C# style parameter (which has no public/private option)
Boolean
getPublic()
Get the public attribute.
boolean
hasFilesets()
Checks that node has embedded
boolean
isEmbed()
Return the embed attribute.
void
setEmbed(boolean embed)
embed the resource in the assembly (default, true) or just link to it.
void
setFile(File file)
name the resource
void
setName(String name)
should the resource have a name?
void
setNamespace(String namespace)
Sets filesets root namespace.
void
setPublic(Boolean aPublic)
VB and J# only: is a resource public or not?

Method Details

addFileset

public void addFileset(FileSet fileset)
Adds a resource file set.
Parameters:
fileset - FileSet

getFile

public File getFile()
The file resource.
Returns:
the file resource.

getName

public String getName()
The name of the resource.
Returns:
the name of the resource.

getNamespace

public String getNamespace()
Filesets root namespace. The value always ends with '.' .
Returns:
String namespace name

getParameters

public void getParameters(Project p,
                          NetCommand command,
                          boolean csharpStyle)
build the C# style parameter (which has no public/private option)
Parameters:
p - the current project.
command - the command.
csharpStyle - a boolean attribute.

getPublic

public Boolean getPublic()
Get the public attribute.
Returns:
the public attribute.

hasFilesets

public boolean hasFilesets()
Checks that node has embedded
Returns:
boolean

isEmbed

public boolean isEmbed()
Return the embed attribute.
Returns:
the embed value.

setEmbed

public void setEmbed(boolean embed)
embed the resource in the assembly (default, true) or just link to it.
Parameters:
embed - a boolean value.

setFile

public void setFile(File file)
name the resource
Parameters:
file - the file.

setName

public void setName(String name)
should the resource have a name?
Parameters:
name - the name of the resource.

setNamespace

public void setNamespace(String namespace)
Sets filesets root namespace.
Parameters:
namespace - String root namespace

setPublic

public void setPublic(Boolean aPublic)
VB and J# only: is a resource public or not?
Parameters:
aPublic - a boolean value.