|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.meyling.principia.module.ModuleAddress
An object of this class represents an address for a module.
| Field Summary | |
private String |
address
address |
private String |
fileName
name of module including version information and postfix |
private String |
header
header (including protocol, host, port, user) but without file path |
private static String |
localBuffer
location for locally buffered module files |
private Version |
moduleVersion
moduleVersion |
private Name |
name
name of module |
private String |
path
path (without protocol, host, port and file name |
private boolean |
relativeAddress
is module address relative |
private Version |
ruleVersion
ruleVersion |
private URL |
url
URL, maybe null if it is a local file |
| Constructor Summary | |
ModuleAddress(ModuleAddress oldAddress,
Name name,
Version moduleVersion,
Version ruleVersion)
Constructor. |
|
ModuleAddress(String address)
Constructor. |
|
ModuleAddress(String address,
ModuleAddress parent)
Constructor. |
|
| Method Summary | |
boolean |
equals(Object object)
|
String |
getAddress()
|
String |
getFileName()
|
String |
getHeader()
|
String |
getLocalName()
Transform an URL address into a local file path where a module could be buffered |
static String |
getLocalName(String address)
Transform an URL address into a local file path where a module could be buffered |
static String |
getModuleFileName(Specification spec)
Get the file name of the specified module. |
static String |
getModuleFileName(String address)
Get the file name of an module without path and protokoll. |
(package private) static ModuleAddress[] |
getModulePaths(Module module,
Specification spec)
Get all potential module addresses from a module specifiaction. |
Version |
getModuleVersion()
|
Name |
getName()
|
String |
getPath()
|
Version |
getRuleVersion()
|
URL |
getURL()
|
int |
hashCode()
|
boolean |
isRelativeAddress()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static final String localBuffer
private final String address
private final URL url
null if it is a local fileprivate final String header
private final String path
private final String fileName
private final boolean relativeAddress
private final Name name
private final Version moduleVersion
private final Version ruleVersion
| Constructor Detail |
public ModuleAddress(String address,
ModuleAddress parent)
throws IOException
address - address of moduleparent - address of parent moduleIOException - if address is formaly incorrect
public ModuleAddress(String address)
throws IOException
address - address of moduleIOException - if address is formaly incorrect
public ModuleAddress(ModuleAddress oldAddress,
Name name,
Version moduleVersion,
Version ruleVersion)
throws IOException
address - address of moduleIOException - if address is formaly incorrect| Method Detail |
public final String getAddress()
public final String getHeader()
public final String getPath()
public final String getFileName()
public final Name getName()
public final URL getURL()
public final Version getRuleVersion()
public final Version getModuleVersion()
public final boolean isRelativeAddress()
public final String getLocalName()
throws IOException
addressIOException - if address
contains no "://"public final String toString()
toString in class Objectpublic final int hashCode()
hashCode in class Objectpublic final boolean equals(Object object)
equals in class Objectpublic static final String getModuleFileName(Specification spec)
spec - here are the (perhaps relative) addresses to
another module
static final ModuleAddress[] getModulePaths(Module module,
Specification spec)
throws ArgumentException
module - starting from that module (has an absolute
address)spec - here are the (perhaps relative) addresses to
another moduleArgumentException - if an URL is malformed
public static final String getLocalName(String address)
throws IOException
address - an URLaddressIOException - if address
contains no "://"
public static final String getModuleFileName(String address)
throws IOException
address - an URLaddressIOException - if that was no valid module address
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||