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

Class DotnetResource

public class DotnetResource extends 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
voidaddFileset(FileSet fileset)
Adds a resource file set.
FilegetFile()
The file resource.
StringgetName()
The name of the resource.
StringgetNamespace()
Filesets root namespace.
voidgetParameters(Project p, NetCommand command, boolean csharpStyle)
build the C# style parameter (which has no public/private option)
BooleangetPublic()
Get the public attribute.
booleanhasFilesets()
Checks that node has embedded
booleanisEmbed()
Return the embed attribute.
voidsetEmbed(boolean embed)
embed the resource in the assembly (default, true) or just link to it.
voidsetFile(File file)
name the resource
voidsetName(String name)
should the resource have a name?
voidsetNamespace(String namespace)
Sets filesets root namespace.
voidsetPublic(Boolean aPublic)
VB and J# only: is a resource public or not?

Method Detail

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.