public static long nextID(Object o) {
        JiveID id = o.getClass().getAnnotation(JiveID.class);

        if (id == null) {
            Log.error("Annotation JiveID must be defined in the class " + o.getClass());
            throw new IllegalArgumentException(
                    "Annotation JiveID must be defined in the class " + o.getClass());
        }

        return nextID(id.value());
    }
Returns the next id for an object that has defined the annotation {@link JiveID}.
The JiveID annotation value is the synonymous for the type integer.<p>

The annotation JiveID should contain the id type for the object (the same number you would
use to call nextID(int type)). Example class definition:</p>
<code>
\@JiveID(10)
public class MyClass {

}
</code>

@param o object that has annotation JiveID.
@return the next unique ID.
@throws IllegalArgumentException If the object passed in does not defined {@link JiveID}
xmppserver/src/main/java/org/jivesoftware/database/SequenceManager.java