class EntryClass extends Object implements Serializable
This class only has a bare minimum of methods, to minimize the amount of code downloaded into clients.
ClassMapper
Modifier and Type | Field and Description |
---|---|
protected long |
hash
Hash for the type
|
private boolean |
integrity
Flag set to true if this instance was unmarshalled from an
integrity-protected stream, or false otherwise
|
protected String |
name
Class name
|
protected int |
numFields
Number of public fields
|
protected int |
numInstances
Number of instances of this class in service registrations
|
protected int |
numTemplates
Number of templates of this class in event registrations
|
protected EntryClass |
replacement
An instance containing only name and hash, no superclass info.
|
private static long |
serialVersionUID |
protected EntryClass |
superclass
Descriptor for the superclass
|
Modifier | Constructor and Description |
---|---|
|
EntryClass(Class clazz,
EntryClass superclass)
Should only be called by ClassMapper
|
private |
EntryClass(EntryClass orig)
Constructor used for creating replacement instances,
containing only name and hash.
|
Modifier and Type | Method and Description |
---|---|
private void |
computeHash(ClassMapper.EntryField[] fields)
Computes a SHA-1 digest from the hash of the superclass, if there
is a superclass, followed by the name of this class, followed by
the name and type for each field, if any, declared by this class and
ordered alphabetically by field name.
|
boolean |
equals(Object o)
Returns true if the object passed in is an instance of EntryClass
with the same type hash as this object.
|
String |
getName()
Returns the name of this type
|
int |
getNumFields()
Return the number of public fields (including superclasses)
|
int |
getNumInstances()
Returns the number of times this type is used in service
registrations
|
int |
getNumTemplates()
Returns the number of times this type is used in event
registrations
|
EntryClass |
getReplacement()
Return the replacement, if any, containing only name and rep.
|
EntryClass |
getSuperclass()
Return the superclass descriptor
|
int |
hashCode()
Return a hashcode for this type.
|
boolean |
isAssignableFrom(EntryClass cls)
This is really only needed in the registrar, but it's very
convenient to have here.
|
private void |
readObject(ObjectInputStream in)
Samples integrity protection setting (if any) of the stream from which
this instance is being deserialized and checks that valid values
for this object have been read from the stream.
|
private void |
readObjectNoData()
Throws InvalidObjectException, since data for this class is required.
|
void |
setNumInstances(int numInstances)
Set the number of instances of this class
|
void |
setNumTemplates(int numTemplates)
Set the number of templates of this class
|
Class |
toClass(String codebase) |
String |
toString() |
private static final long serialVersionUID
protected String name
protected long hash
protected EntryClass superclass
protected int numFields
protected transient int numInstances
protected transient int numTemplates
protected transient EntryClass replacement
private transient boolean integrity
public EntryClass(Class clazz, EntryClass superclass) throws MarshalException
MarshalException
private EntryClass(EntryClass orig)
public EntryClass getSuperclass()
public int getNumFields()
public void setNumInstances(int numInstances)
public void setNumTemplates(int numTemplates)
public EntryClass getReplacement()
public boolean isAssignableFrom(EntryClass cls)
public int getNumInstances()
public int getNumTemplates()
public Class toClass(String codebase) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public String getName()
public boolean equals(Object o)
public int hashCode()
private void computeHash(ClassMapper.EntryField[] fields) throws MarshalException
MarshalException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private void readObjectNoData() throws InvalidObjectException
InvalidObjectException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.