public class ConditionInfo extends java.lang.Object
This class encapsulates two pieces of information: a Condition type
(class name), which must implement
Condition, and the arguments
passed to its constructor.
In order for a Condition represented by a
ConditionInfo to be
instantiated and considered during a permission check, its Condition class
must be available from the system classpath.
The Condition class must either:
getConditionmethod that takes a
Bundleobject and a
ConditionInfoobject as arguments. That method must return an object that implements the
Conditioninterface and define a public constructor that takes a
Bundleobject and a
ConditionInfoobject as arguments.
|Constructor and Description|
|Modifier and Type||Method and Description|
Determines the equality of two
Returns arguments of this
Returns the string encoding of this
Returns the fully qualified class name of the condition represented by this
Returns the hash code value for this object.
Returns the string representation of this
public ConditionInfo(java.lang.String type, java.lang.String args)
ConditionInfofrom the specified type and args.
type- The fully qualified class name of the Condition represented by this
args- The arguments for the Condition. These arguments are available to the newly created Condition by calling the
public ConditionInfo(java.lang.String encodedCondition)
ConditionInfoobject from the specified encoded
ConditionInfostring. White space in the encoded
ConditionInfostring is ignored.
encodedCondition- The encoded
java.lang.IllegalArgumentException- If the specified
encodedConditionis not properly formatted.
public final java.lang.String getEncoded()
ConditionInfoin a form suitable for restoring this
The encoded format is:
[type "arg0" "arg1" ...]where argN are strings that must be encoded for proper parsing. Specifically, the
\, carriage return, and line feed characters must be escaped using
The encoded string contains no leading or trailing whitespace characters. A single space character is used between type and "arg0" and between the arguments.
public java.lang.String toString()
ConditionInfo. The string is created by calling the
getEncodedmethod on this
public final java.lang.String getType()
public final java.lang.String getArgs()
ConditionInfo. An empty array is returned if the
ConditionInfohas no arguments.
public boolean equals(java.lang.Object obj)
ConditionInfoobjects. This method checks that specified object has the same type and args as this
obj- The object to test for equality with this
ConditionInfo, and has the same type and args as this
public int hashCode()
Copyright © OSGi Alliance (2000, 2020). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0