org.apache.tools.ant.taskdefs.condition

Class IsSigned

public class IsSigned extends DataType implements Condition

Checks whether a jarfile is signed: if the name of the signature is passed, the file is checked for presence of that particular signature; otherwise the file is checked for the existence of any signature.
Method Summary
booleaneval()
Returns true if the file exists and is signed with the signature specified, or, if name wasn't specified, if the file contains a signature.
static booleanisSigned(File zipFile, String name)
Returns true if the file exists and is signed with the signature specified, or, if name wasn't specified, if the file contains a signature.
voidsetFile(File file)
The jarfile that is to be tested for the presence of a signature.
voidsetName(String name)
The signature name to check jarfile for.

Method Detail

eval

public boolean eval()
Returns true if the file exists and is signed with the signature specified, or, if name wasn't specified, if the file contains a signature.

Returns: true if the file is signed.

isSigned

public static boolean isSigned(File zipFile, String name)
Returns true if the file exists and is signed with the signature specified, or, if name wasn't specified, if the file contains a signature.

Parameters: zipFile the zipfile to check name the signature to check (may be killed)

Returns: true if the file is signed.

Throws: IOException on error

setFile

public void setFile(File file)
The jarfile that is to be tested for the presence of a signature.

Parameters: file jarfile to be tested.

setName

public void setName(String name)
The signature name to check jarfile for.

Parameters: name signature to look for.