Package ch.njol.yggdrasil
Class SimpleClassResolver
java.lang.Object
ch.njol.yggdrasil.SimpleClassResolver
- All Implemented Interfaces:
ClassResolver
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SimpleClassResolver
public SimpleClassResolver()
-
-
Method Details
-
registerClass
-
getClass
Description copied from interface:ClassResolver
Resolves a class by its ID.- Specified by:
getClass
in interfaceClassResolver
- Parameters:
id
- The ID used when storing objects- Returns:
- The Class object that represents data with the given ID, or null if the ID does not belong to the implementor
-
getID
Description copied from interface:ClassResolver
Gets an ID for a Class. The ID is used to identify the type of a saved object.// TODO make sure that it's unique
- Specified by:
getID
in interfaceClassResolver
- Parameters:
c
- The class to get the ID of- Returns:
- The ID of the given class, or null if this is not a class of the implementor
-