Package com.sun.jini.reggie
Class EntryClass
java.lang.Object
com.sun.jini.reggie.EntryClass
- All Implemented Interfaces:
Serializable
An EntryClass is a descriptor for an entry class, packaged up for transmission between
client-side proxies and the registrar server. Instances are never visible to clients, they are
private to the communication between the proxies and the server. Note that we don't transmit
information about interfaces implemented by the class, because it isn't necessary given the
specific use of type information for entries.
This class only has a bare minimum of methods, to minimize the amount of code downloaded into clients.
- Author:
- Sun Microsystems, Inc.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longHash for the typeprotected StringClass nameprotected intNumber of public fieldsprotected intNumber of instances of this class in service registrationsprotected intNumber of templates of this class in event registrationsprotected EntryClassAn instance containing only name and hash, no superclass info.protected EntryClassDescriptor for the superclass -
Constructor Summary
ConstructorsConstructorDescriptionEntryClass(Class clazz, EntryClass superclass) Should only be called by ClassMapper -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the object passed in is an instance of EntryClass with the same type hash as this object.getName()Returns the name of this typeintReturn the number of public fields (including superclasses)intReturns the number of times this type is used in service registrationsintReturns the number of times this type is used in event registrationsReturn the replacement, if any, containing only name and rep.Return the superclass descriptorinthashCode()Return a hashcode for this type.booleanThis is really only needed in the registrar, but it's very convenient to have here.voidsetNumInstances(int numInstances) Set the number of instances of this classvoidsetNumTemplates(int numTemplates) Set the number of templates of this classtoString()
-
Field Details
-
name
Class name -
hash
protected long hashHash for the type -
superclass
Descriptor for the superclass -
numFields
protected int numFieldsNumber of public fields -
numInstances
protected transient int numInstancesNumber of instances of this class in service registrations -
numTemplates
protected transient int numTemplatesNumber of templates of this class in event registrations -
replacement
An instance containing only name and hash, no superclass info. This is only used on the registrar side, to minimize the amount of info transmitted back to clients.
-
-
Constructor Details
-
EntryClass
Should only be called by ClassMapper- Throws:
MarshalException
-
-
Method Details
-
getSuperclass
Return the superclass descriptor -
getNumFields
public int getNumFields()Return the number of public fields (including superclasses) -
setNumInstances
public void setNumInstances(int numInstances) Set the number of instances of this class -
setNumTemplates
public void setNumTemplates(int numTemplates) Set the number of templates of this class -
getReplacement
Return the replacement, if any, containing only name and rep. -
isAssignableFrom
This is really only needed in the registrar, but it's very convenient to have here. -
getNumInstances
public int getNumInstances()Returns the number of times this type is used in service registrations- Returns:
- number of instances of this type in use in service registrations
-
getNumTemplates
public int getNumTemplates()Returns the number of times this type is used in event registrations- Returns:
- number of times this type is used in event registrations
-
toClass
- Throws:
IOExceptionClassNotFoundException
-
getName
Returns the name of this type- Returns:
- the name of this type
-
equals
Returns true if the object passed in is an instance of EntryClass with the same type hash as this object. Returns false otherwise. -
hashCode
public int hashCode()Return a hashcode for this type. -
toString
-