JPF 1.5.1

org.java.plugin.tools.mocks
Class MockLibrary

java.lang.Object
  extended by org.java.plugin.tools.mocks.MockIdentity
      extended by org.java.plugin.tools.mocks.MockPluginElement<Library>
          extended by 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
MockLibrary()
           
 
Method Summary
 MockLibrary addExport(java.lang.String exportPrefix)
           
 java.util.Collection<java.lang.String> getExports()
          This method should return collection of String objects that represent resource name prefixes or package name patterns that are available to other plug-ins.
 java.lang.String getPath()
           
 java.lang.String getUniqueId()
           
 Version getVersion()
           
 boolean isCodeLibrary()
           
 MockLibrary setCodeLibrary(boolean value)
           
 MockLibrary setPath(java.lang.String value)
           
 MockLibrary setVersion(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.Identity
getId
 
Methods inherited from interface org.java.plugin.registry.PluginElement
getDeclaringPluginDescriptor, getDeclaringPluginFragment
 
Methods inherited from interface org.java.plugin.registry.Identity
getId
 
Methods inherited from interface org.java.plugin.registry.Documentable
getDocsPath, getDocumentation
 

Constructor Detail

MockLibrary

public MockLibrary()
Method Detail

getExports

public java.util.Collection<java.lang.String> getExports()
Description copied from interface: Library
This method should return collection of String objects 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:
getExports in interface Library
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:
getPath in interface Library
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:
getVersion in interface Library
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:
isCodeLibrary in interface Library
Returns:
true if 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:
getUniqueId in interface UniqueIdentity
Returns:
unique ID of plug-in element
See Also:
UniqueIdentity.getUniqueId()

JPF 1.5.1

Copyright © 2004-2007 Dmitry Olshansky. All Rights Reserved.