Example usage for java.rmi MarshalledObject hashCode

List of usage examples for java.rmi MarshalledObject hashCode

Introduction

In this page you can find the example usage for java.rmi MarshalledObject hashCode.

Prototype

public int hashCode() 

Source Link

Document

Return a hash code for this MarshalledObject.

Usage

From source file:de.laures.cewolf.taglib.util.KeyGenerator.java

public static int generateKey(Serializable obj) {
    if (obj == null) {
        NoKeyException ex = new NoKeyException("assertion failed: can not generate key for null,");
        throw ex;
    }//from   w  w  w . j ava 2  s. co m
    try {
        MarshalledObject mo = new MarshalledObject(obj);
        return mo.hashCode();
    } catch (IOException ioex) {
        log.error("IOException during key generation KeyGenerator.generateKey()", ioex);
        throw new NoKeyException(obj + " is not serializable.");
    }
}