Package org.java.plugin.tools.mocks
Class MockLibrary
- java.lang.Object
-
- org.java.plugin.tools.mocks.MockIdentity
-
- org.java.plugin.tools.mocks.MockPluginElement<Library>
-
- org.java.plugin.tools.mocks.MockLibrary
-
- All Implemented Interfaces:
Documentable<Library>,Identity,Library,PluginElement<Library>,UniqueIdentity
public class MockLibrary extends MockPluginElement<Library> implements Library
- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description MockLibrary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MockLibraryaddExport(java.lang.String exportPrefix)java.util.Collection<java.lang.String>getExports()This method should return collection ofStringobjects that represent resource name prefixes or package name patterns that are available to other plug-ins.java.lang.StringgetPath()java.lang.StringgetUniqueId()VersiongetVersion()booleanisCodeLibrary()MockLibrarysetCodeLibrary(boolean value)MockLibrarysetPath(java.lang.String value)MockLibrarysetVersion(Version value)-
Methods inherited from class org.java.plugin.tools.mocks.MockPluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment, getDocsPath, getDocumentation, setDeclaringPluginDescriptor, setDeclaringPluginFragment, setDocsPath, setDocumentation
-
Methods inherited from class org.java.plugin.tools.mocks.MockIdentity
getId, setId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.java.plugin.registry.Documentable
getDocsPath, getDocumentation
-
Methods inherited from interface org.java.plugin.registry.PluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment
-
-
-
-
Method Detail
-
getExports
public java.util.Collection<java.lang.String> getExports()
Description copied from interface:LibraryThis method should return collection ofStringobjects that represent resource name prefixes or package name patterns that are available to other plug-ins.
For code library, prefix is a package name, for resource library, the same rules applied to relative resource path calculated against library path (you can replace slash characters in path with dots).
Example prefixes are:
"*", "package.name.*", "package.name.ClassName", "resource/path/*- Specified by:
getExportsin interfaceLibrary- Returns:
- collection of exported resource name patterns
- See Also:
Library.getExports()
-
addExport
public MockLibrary addExport(java.lang.String exportPrefix)
- Parameters:
exportPrefix- export prefix to add- Returns:
- this instance
-
getPath
public java.lang.String getPath()
- Specified by:
getPathin interfaceLibrary- Returns:
- path to resource
- See Also:
Library.getPath()
-
setPath
public MockLibrary setPath(java.lang.String value)
- Parameters:
value- the path to set- Returns:
- this instance
-
getVersion
public Version getVersion()
- Specified by:
getVersionin interfaceLibrary- Returns:
- library version identifier as specified in manifest file or
null - See Also:
Library.getVersion()
-
setVersion
public MockLibrary setVersion(Version value)
- Parameters:
value- the version to set- Returns:
- this instance
-
isCodeLibrary
public boolean isCodeLibrary()
- Specified by:
isCodeLibraryin interfaceLibrary- Returns:
trueif this is "code" library- See Also:
Library.isCodeLibrary()
-
setCodeLibrary
public MockLibrary setCodeLibrary(boolean value)
- Parameters:
value- the code library flag to set- Returns:
- this instance
-
getUniqueId
public java.lang.String getUniqueId()
- Specified by:
getUniqueIdin interfaceUniqueIdentity- Returns:
- unique ID of plug-in element
- See Also:
UniqueIdentity.getUniqueId()
-
-