com.nimbusds.jose
Class JOSEObjectType

java.lang.Object
  extended by com.nimbusds.jose.JOSEObjectType
All Implemented Interfaces:
net.minidev.json.JSONAware

@Immutable
public final class JOSEObjectType
extends Object
implements net.minidev.json.JSONAware

JOSE object type, represents the typ header parameter in plain, JSON Web Signature (JWS) and JSON Web Encryption (JWE) objects. This class is immutable.

Includes constants for the following standard types:

Additional types can be defined using the constructor.

Version:
$version$ (2013-01-15)
Author:
Vladimir Dzhuvinov

Field Summary
static JOSEObjectType JWE
          JWE object type.
static JOSEObjectType JWS
          JWS object type.
 
Constructor Summary
JOSEObjectType(String type)
          Creates a new JOSE object type.
 
Method Summary
 boolean equals(Object object)
          Overrides Object.equals().
 String getType()
          Gets the JOSE object type.
 int hashCode()
          Overrides Object.hashCode().
 String toJSONString()
          Returns the JSON string representation of this JOSE object type.
 String toString()
          Returns the string representation of this JOSE object type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

JWS

public static final JOSEObjectType JWS
JWS object type.


JWE

public static final JOSEObjectType JWE
JWE object type.

Constructor Detail

JOSEObjectType

public JOSEObjectType(String type)
Creates a new JOSE object type.

Parameters:
type - The object type. Must not be null.
Method Detail

getType

public String getType()
Gets the JOSE object type.

Returns:
The JOSE object type.

hashCode

public int hashCode()
Overrides Object.hashCode().

Overrides:
hashCode in class Object
Returns:
The object hash code.

equals

public boolean equals(Object object)
Overrides Object.equals().

Overrides:
equals in class Object
Parameters:
object - The object to compare to.
Returns:
true if the objects have the same value, otherwise false.

toString

public String toString()
Returns the string representation of this JOSE object type.

Overrides:
toString in class Object
Returns:
The string representation.
See Also:
getType()

toJSONString

public String toJSONString()
Returns the JSON string representation of this JOSE object type.

Specified by:
toJSONString in interface net.minidev.json.JSONAware
Returns:
The JSON string representation.


Copyright © 2013 NimbusDS. All Rights Reserved.