|
org.netbeans.modules.j2eeserver/4 1.89.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.j2ee.deployment.plugins.api.ServerLibraryDependency
public final class ServerLibraryDependency
Represents the library dependency. For example library version required by the enterprise module.
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
static ServerLibraryDependency |
exactVersion(String name,
Version specificationVersion,
Version implementationVersion)
Creates the library dependency which specifies the exact specification and implementation version. |
Version |
getImplementationVersion()
Returns the implementation version. |
String |
getName()
Returns the name of the required library. |
Version |
getSpecificationVersion()
Returns the specification version. |
int |
hashCode()
|
boolean |
isExactMatch()
Returns true if the exactly the same version are required
by the dependency to match the library. |
static ServerLibraryDependency |
minimalVersion(String name,
Version specificationVersion,
Version implementationVersion)
Creates the library dependency which specifies the minimal specification and implementation version. |
boolean |
specificationEquals(Object obj)
Returns true if the other object is library dependency and both
name and specification version are equal to name and specification version
of this object. |
boolean |
versionMatches(ServerLibrary library)
Returns true if the given library matches the dependency. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ServerLibraryDependency minimalVersion(@NonNull
String name,
@NullAllowed
Version specificationVersion,
@NullAllowed
Version implementationVersion)
When both specification and implementation version is null
it has the meaning of any version.
name - name of the libraryspecificationVersion - the minimal specification version, may be nullimplementationVersion - the minimal implementation version, may be null
public static ServerLibraryDependency exactVersion(@NonNull
String name,
@NullAllowed
Version specificationVersion,
@NullAllowed
Version implementationVersion)
name - name of the libraryspecificationVersion - the minimal specification version, may be nullimplementationVersion - the minimal implementation version, may be null
public boolean versionMatches(@NonNull
ServerLibrary library)
true if the given library matches the dependency.
The library matches the dependency if the dependency specify the minimal versions (specification and/or implementation) and corresponding versions of the library are equal or greater. If the dependency specify the exact version the corresponding versions of library must be the same as those specified for dependency.
library - the library to check
true if the given library matches the dependencyVersion.isAboveOrEqual(org.netbeans.modules.j2ee.deployment.common.api.Version),
Version.isBelowOrEqual(org.netbeans.modules.j2ee.deployment.common.api.Version)@NonNull public String getName()
@CheckForNull public Version getSpecificationVersion()
null.
null@CheckForNull public Version getImplementationVersion()
null.
nullpublic boolean isExactMatch()
true if the exactly the same version are required
by the dependency to match the library.
true if the exactly the same version are required
by the dependency to match the librarypublic boolean equals(Object obj)
equals in class Objectpublic boolean specificationEquals(Object obj)
true if the other object is library dependency and both
name and specification version are equal to name and specification version
of this object.
obj - object to test
true if the other object is library dependency
with same name and specification version as this objectpublic int hashCode()
hashCode in class Objectequals(java.lang.Object)
|
org.netbeans.modules.j2eeserver/4 1.89.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||