|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ConForM.CoopnTools.CoKer.PackageMgr.PackageMgr
Package Manager. This class essentially defines the services provided by the package manager.
Field Summary | |
static int |
ASPECT
Coopn Aspect tag. |
static int |
COALASOURCE
Coala sources tag. |
static int |
CONSTRAINT
Constraint tag. |
static int |
COOPNDIGEST
Coopn compact tag. |
static int |
COOPNSOURCE
Coopn sources tag. |
static java.lang.String[] |
fileExtensions
File extensions. |
static boolean[] |
lexicalReaders
Possibilities of lexical reading. |
static int |
LOGIC
Logic file tag. |
static int |
MODULEKINDNUMBER
Number of kind of modules. |
static int |
PACKAGE
Package file tag. |
static int |
SCENARIO
Scenario tag. |
static int |
SPECIFICATION
Specification file tag. |
static boolean[] |
syntacticReaders
Possibilities of syntactic reading. |
static int |
TEST
Specification file tag. |
static java.lang.String |
VERSION
Package Manager version; |
Constructor Summary | |
PackageMgr(CoopnEnv env)
Constructor. |
|
PackageMgr(java.lang.String pack,
CoopnEnv env)
Constructor. |
Method Summary | |
java.lang.String[] |
accessibleEntries(java.lang.String packageName,
int moduleKind)
Get the entries accessible from a package. |
void |
addAssociatedEntry(java.lang.String packageName,
int entryKind,
java.lang.String entryName)
Associate a module entry to the package. |
void |
addAssociatedEntry(java.lang.String packageName,
int entryKind,
java.lang.String entryName,
java.lang.String fileName)
Associate a module entry to the package. |
void |
addAuthor(java.lang.String packageName,
PackageAuthorSymbol symbol)
Add an author. |
void |
addEntry(java.lang.String packageName,
PackageEntrySymbol symbol)
Add a module entry. |
void |
addUse(java.lang.String packageName,
PackageUseSymbol symbol)
Add an use. |
void |
createPackage(java.lang.String packageName,
java.lang.String comment,
java.lang.String version,
java.lang.String date)
Creates a package. |
java.lang.String[] |
definedEntries(java.lang.String packageName,
int moduleKind)
Get the entries defined in (i.e. directly accessible from) a package. |
java.lang.String |
displayComment(java.lang.String elem)
Comment to String conversion. |
java.lang.String |
displayModuleName(java.lang.String elem)
ModuleName to String conversion. |
java.lang.String |
displayName(java.lang.String elem)
Name to String conversion. |
void |
dispose()
Leave a package manager. |
java.lang.String |
evalComment(java.lang.String string)
String to comment conversion. |
java.lang.String |
evalModuleName(java.lang.String string)
String to ModuleName conversion. |
java.lang.String |
evalName(java.lang.String string)
String to Name conversion. |
java.io.File |
getAndObserveFile(java.lang.String moduleName,
int moduleKind,
FileObserver observer)
Get a file and register a file observer. |
java.io.File |
getAndObserveFile(java.lang.String moduleName,
int moduleKind,
java.lang.String altName,
FileObserver observer)
Get a file and register a file observer. |
java.io.File |
getAndObserveFile(java.lang.String moduleName,
int moduleKind,
java.lang.String altName,
int altKind,
FileObserver observer)
Get a file and register a file observer. |
PackageModule |
getAndObservePackageModule(java.lang.String packageName,
PackageModuleObserver observer)
Get a package module and register a package module observer. |
CoopnEnv |
getEnv(int moduleType)
Get the environment. |
java.io.File |
getFile(java.lang.String moduleName,
int moduleKind)
Get a file. |
java.io.File |
getFile(java.lang.String moduleName,
int moduleKind,
java.lang.String altName)
Get a file. |
java.io.File |
getFile(java.lang.String moduleName,
int moduleKind,
java.lang.String altName,
int altKind)
Get a file. |
LexicalReader |
getLexicalReader(int moduleKind,
java.io.Reader reader)
Get a lexical reader for a particular kind of module. |
PackageModule |
getPackageModule(java.lang.String packageName)
Get a package module. |
PackageModule |
getPackageOf(java.lang.String moduleName,
int moduleKind)
Retrieve the package defining a particular module. |
PackageModule |
getPackageOf(java.lang.String moduleName,
int moduleKind,
java.lang.String altName)
Retrieve the package defining a particular module. |
PackageModule |
getPackageOf(java.lang.String moduleName,
int moduleKind,
java.lang.String altName,
int altKind)
Retrieve the package defining a particular module. |
SyntacticModuleReader |
getSyntacticModuleReader(int moduleKind)
Get a syntactic module reader for a particular kind of module. |
boolean |
isLibrary(java.lang.String moduleName,
int moduleKind)
Is library decision. |
boolean |
isLibrary(java.lang.String moduleName,
int moduleKind,
java.lang.String altName)
Is library decision. |
boolean |
isLibrary(java.lang.String moduleName,
int moduleKind,
java.lang.String altName,
int altKind)
Is library decision. |
CoopnUser |
lockPackageModule(java.lang.String packageName,
CoopnUser user)
Lock a package module. |
void |
modifyComment(java.lang.String packageName,
java.lang.String comment)
Change the comment of a package. |
void |
modifyDate(java.lang.String packageName,
java.lang.String date)
Change the date of a package. |
void |
modifyVersion(java.lang.String packageName,
java.lang.String version)
Change the version of a package. |
void |
reloadPackageModule(java.lang.String packageName)
Reload a package module from the disk. |
void |
removeAssociatedEntry(java.lang.String packageName,
int entryKind,
java.lang.String entryName,
java.lang.String fileName)
Remove an associated module entry to the package. |
void |
removeAuthor(java.lang.String packageName,
PackageAuthorSymbol symbol)
Remove an author. |
void |
removeEntry(java.lang.String packageName,
PackageEntrySymbol symbol)
Remove a module entry. |
void |
removeUse(java.lang.String packageName,
PackageUseSymbol symbol)
Remove an use. |
java.lang.String |
rootPackage()
Get the root package as a String. |
void |
syncPackageModule(java.lang.String packageName)
Sync a package module. |
void |
unlockPackageModule(java.lang.String packageName)
Unlock a package module. |
void |
unregisterFileObserver(java.lang.String moduleName,
int moduleKind,
FileObserver observer)
unregister a file observer. |
void |
unregisterObserver(java.lang.String packageName,
PackageModuleObserver observer)
unregister a package module observer. |
boolean |
upToDate(CoopnCompilInfo info,
int moduleKind)
Up-to-Date decision. |
boolean |
upToDate(CoopnTimestamp time,
java.lang.String moduleName,
int moduleKind)
Up-to-Date decision. |
boolean |
upToDate(java.io.File file,
java.lang.String moduleName,
int moduleKind)
Up-to-Date decision. |
void |
use()
Uses a package manager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String VERSION
public static final int MODULEKINDNUMBER
public static final int ASPECT
public static final int COALASOURCE
public static final int COOPNDIGEST
public static final int CONSTRAINT
public static final int COOPNSOURCE
public static final int PACKAGE
public static final int LOGIC
public static final int SCENARIO
public static final int SPECIFICATION
public static final int TEST
public static final java.lang.String[] fileExtensions
COOPNSOURCE
public static final boolean[] lexicalReaders
public static final boolean[] syntacticReaders
Constructor Detail |
public PackageMgr(java.lang.String pack, CoopnEnv env) throws java.lang.IllegalArgumentException, java.io.IOException
pack
- the packageenv
- the environment of the package managerjava.lang.IllegalArgumentException
- the environment is absent or inconsistent.java.io.IOException
- error was detected when loading the package
files used by the project.public PackageMgr(CoopnEnv env) throws java.lang.IllegalArgumentException, java.io.IOException
pack
- the packageenv
- the environment of the package managerjava.lang.IllegalArgumentException
- the environment is absent or inconsistent.java.io.IOException
- error was detected when loading the package
files used by the project.Method Detail |
public void use()
public void dispose()
public CoopnEnv getEnv(int moduleType) throws java.lang.IllegalArgumentException
moduleType
- the module Type.java.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public java.lang.String rootPackage()
public boolean upToDate(CoopnCompilInfo info, int moduleKind) throws java.lang.IllegalArgumentException
info
- the compilation information associated to the
modulemoduleKind
- the module typejava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public boolean upToDate(CoopnTimestamp time, java.lang.String moduleName, int moduleKind) throws java.lang.IllegalArgumentException
time
- the time stampmoduleName
- the module namemoduleKind
- the module kindjava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public boolean upToDate(java.io.File file, java.lang.String moduleName, int moduleKind) throws java.lang.IllegalArgumentException
file
- the filemoduleName
- the module namemoduleKind
- the module kindjava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public boolean isLibrary(java.lang.String moduleName, int moduleKind) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type; must be in the range
0..MODULEKINDNUMBER-1, and different from
PACKAGEjava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public boolean isLibrary(java.lang.String moduleName, int moduleKind, java.lang.String altName) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type; must be in the range
0..MODULEKINDNUMBER-1, and different from
PACKAGEaltName
- the alternate module namejava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public boolean isLibrary(java.lang.String moduleName, int moduleKind, java.lang.String altName, int altKind) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type; must be in the range
0..MODULEKINDNUMBER-1, and different from
PACKAGEaltName
- the alternate module namealtKind
- the alternate module type. Must be in the range 0..MODULEKINDNUMBER-1.java.lang.IllegalArgumentException
- the module kind is illegal, or a problem
occured with the environment.public PackageModule getPackageOf(java.lang.String moduleName, int moduleKind) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type; must be in the range
0..MODULEKINDNUMBER-1, and different from
PACKAGEjava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public PackageModule getPackageOf(java.lang.String moduleName, int moduleKind, java.lang.String altName) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type; must be in the range
0..MODULEKINDNUMBER-1, and different from
PACKAGEaltName
- the alternate module namejava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public PackageModule getPackageOf(java.lang.String moduleName, int moduleKind, java.lang.String altName, int altKind) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type; must be in the range
0..MODULEKINDNUMBER-1, and different from
PACKAGEaltName
- the alternate module namealtKind
- the alternate module type. Must be in the range 0..MODULEKINDNUMBER-1.java.lang.IllegalArgumentException
- the module kind is illegal, or a problem
occured with the environment.public java.io.File getFile(java.lang.String moduleName, int moduleKind) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type. Must be in the range
0..MODULEKINDNUMBER-1.java.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public java.io.File getFile(java.lang.String moduleName, int moduleKind, java.lang.String altName) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type. Must be in the range
0..MODULEKINDNUMBER-1.altName
- the alternate module namejava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public java.io.File getFile(java.lang.String moduleName, int moduleKind, java.lang.String altName, int altKind) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type. Must be in the range
0..MODULEKINDNUMBER-1.altName
- the alternate module namealtKind
- the alternate module type. Must be in the range
0..MODULEKINDNUMBER-1.java.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public java.io.File getAndObserveFile(java.lang.String moduleName, int moduleKind, FileObserver observer) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type. Must be in the range
0..MODULEKINDNUMBER-1.observer
- the file observerjava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public java.io.File getAndObserveFile(java.lang.String moduleName, int moduleKind, java.lang.String altName, FileObserver observer) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type. Must be in the range
0..MODULEKINDNUMBER-1.altName
- the alternate module nameobserver
- the file observerjava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public java.io.File getAndObserveFile(java.lang.String moduleName, int moduleKind, java.lang.String altName, int altKind, FileObserver observer) throws java.lang.IllegalArgumentException
moduleName
- the module namemoduleKind
- the module type. Must be in the range
0..MODULEKINDNUMBER-1.altName
- the alternate module namealtKind
- the alternate module type. Must be in the range
0..MODULEKINDNUMBER-1.observer
- the file observerjava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public void unregisterFileObserver(java.lang.String moduleName, int moduleKind, FileObserver observer)
moduleName
- the module namemoduleKind
- the module type. Must be in the range
0..MODULEKINDNUMBER-1.observer
- the file observerjava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public java.lang.String[] accessibleEntries(java.lang.String packageName, int moduleKind)
packageName
- the root package namemoduleKind
- the module type. Must be in the range
0..MODULEKINDNUMBER-1.observer
- the file observerjava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public java.lang.String[] definedEntries(java.lang.String packageName, int moduleKind)
packageName
- the root package namemoduleKind
- the module type. Must be in the range
0..MODULEKINDNUMBER-1.observer
- the file observerjava.lang.IllegalArgumentException
- the module type is illegal, or a problem
occured with the environment.public PackageModule getPackageModule(java.lang.String packageName) throws java.lang.IllegalArgumentException
packageName
- the package namejava.lang.IllegalArgumentException
- A problem
occured with the environment.public PackageModule getAndObservePackageModule(java.lang.String packageName, PackageModuleObserver observer) throws java.lang.IllegalArgumentException
packageName
- the package nameobserver
- the package module observerjava.lang.IllegalArgumentException
- A problem
occured with the environment.public void unregisterObserver(java.lang.String packageName, PackageModuleObserver observer)
packageName
- the package nameobserver
- the package module observerjava.lang.IllegalArgumentException
- A problem
occured with the environment.public void addAssociatedEntry(java.lang.String packageName, int entryKind, java.lang.String entryName)
packageName
- the package name; if null then method has no effectentryKind
- the entry kindentryName
- the entry namejava.lang.IllegalArgumentException
- the package is not found.public void addAssociatedEntry(java.lang.String packageName, int entryKind, java.lang.String entryName, java.lang.String fileName)
packageName
- the package name; if null then method has no effectentryKind
- the entry kindentryName
- the entry namefileName
- the file namejava.lang.IllegalArgumentException
- the package is not found.public void removeAssociatedEntry(java.lang.String packageName, int entryKind, java.lang.String entryName, java.lang.String fileName)
packageName
- the package name; if null then method has no effectentryKind
- the entry kindentryName
- the entry namefileName
- the file namejava.lang.IllegalArgumentException
- the package is not found.public void reloadPackageModule(java.lang.String packageName) throws java.lang.IllegalAccessException
packageName
- the package namejava.lang.IllegalArgumentException
- the package is not found.java.lang.IllegalAccessException
- the package is not locked.public void createPackage(java.lang.String packageName, java.lang.String comment, java.lang.String version, java.lang.String date) throws java.lang.IllegalAccessException
packageName
- the package namecomment
- the associated comment; may be nullversion
- the package version; may be nulldate
- the package date; may be nulljava.lang.IllegalArgumentException
- problem with arguments.java.lang.IllegalAccessException
- the package is not locked.public void modifyComment(java.lang.String packageName, java.lang.String comment) throws java.lang.IllegalAccessException
packageName
- the package namecomment
- the new comment, or null of no commentjava.lang.IllegalArgumentException
- the package is not found.java.lang.IllegalAccessException
- the package is not locked.public void modifyVersion(java.lang.String packageName, java.lang.String version) throws java.lang.IllegalAccessException
packageName
- the package nameversion
- the new version, or null of no versionjava.lang.IllegalArgumentException
- the package is not found.java.lang.IllegalAccessException
- the package is not locked.public void modifyDate(java.lang.String packageName, java.lang.String date) throws java.lang.IllegalAccessException
packageName
- the package namedate
- the new date, or null of no datejava.lang.IllegalArgumentException
- the package is not found.java.lang.IllegalAccessException
- the package is not locked.public void addAuthor(java.lang.String packageName, PackageAuthorSymbol symbol) throws java.lang.IllegalAccessException
packageName
- the package namesymbol
- the author symboljava.lang.IllegalArgumentException
- the package is not found.java.lang.IllegalAccessException
- the package is not locked.public void removeAuthor(java.lang.String packageName, PackageAuthorSymbol symbol) throws java.lang.IllegalAccessException
packageName
- the package namesymbol
- the author symboljava.lang.IllegalArgumentException
- the package is not found.java.lang.IllegalAccessException
- the package is not locked.public void addUse(java.lang.String packageName, PackageUseSymbol symbol) throws java.lang.IllegalAccessException
packageName
- the package namesymbol
- the use symboljava.lang.IllegalArgumentException
- the package is not found.java.lang.IllegalAccessException
- the package is not locked.public void removeUse(java.lang.String packageName, PackageUseSymbol symbol) throws java.lang.IllegalAccessException
packageName
- the package namesymbol
- the use symboljava.lang.IllegalArgumentException
- the package is not found.java.lang.IllegalAccessException
- the package is not locked.public void addEntry(java.lang.String packageName, PackageEntrySymbol symbol) throws java.lang.IllegalAccessException
packageName
- the package namesymbol
- the module entry symboljava.lang.IllegalArgumentException
- the package is not found.java.lang.IllegalAccessException
- the package is not locked.public void removeEntry(java.lang.String packageName, PackageEntrySymbol symbol) throws java.lang.IllegalAccessException
packageName
- the package namesymbol
- the module entry symboljava.lang.IllegalArgumentException
- the package is not found.java.lang.IllegalAccessException
- the package is not locked.public CoopnUser lockPackageModule(java.lang.String packageName, CoopnUser user)
packagename
- the package to lockuser
- the user who want to acquire the lockjava.lang.IllegalArgumentException
- an argument is illegalpublic void unlockPackageModule(java.lang.String packageName)
public void syncPackageModule(java.lang.String packageName)
public java.lang.String evalComment(java.lang.String string) throws java.lang.IllegalArgumentException
string
- the string to evaluates; may be nulljava.lang.IllegalArgumentException
- the element cannot be delivered (because it is
erroneous, and so on).public java.lang.String displayComment(java.lang.String elem) throws java.lang.IllegalArgumentException
elem
- the element to display; may be nulljava.lang.IllegalArgumentException
- the string cannot be delivered (because it is
erroneous, and so on).public java.lang.String evalName(java.lang.String string) throws java.lang.IllegalArgumentException
string
- the string to evaluatesjava.lang.IllegalArgumentException
- the element cannot be delivered (because it is
erroneous, and so on).public java.lang.String displayName(java.lang.String elem) throws java.lang.IllegalArgumentException
elem
- the element to displayjava.lang.IllegalArgumentException
- the string cannot be delivered (because it is
erroneous, and so on).public java.lang.String evalModuleName(java.lang.String string) throws java.lang.IllegalArgumentException
string
- the string to evaluatesjava.lang.IllegalArgumentException
- the element cannot be delivered (because it is
erroneous, and so on).public java.lang.String displayModuleName(java.lang.String elem) throws java.lang.IllegalArgumentException
elem
- the element to displayjava.lang.IllegalArgumentException
- the string cannot be delivered (because it is
erroneous, and so on).public LexicalReader getLexicalReader(int moduleKind, java.io.Reader reader)
moduleKind
- the kind of modulereader
- input input file readerjava.lang.IllegalArgumentException
- a problem occured with the environment.public SyntacticModuleReader getSyntacticModuleReader(int moduleKind)
moduleKind
- the kind of modulejava.lang.IllegalArgumentException
- a problem occured with the environment.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |