Class NdNodeTypeRegistry<R>
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.NdNodeTypeRegistry<R>
Maps integer constants onto factories for
NdNode
objects.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateNode(Nd nd, long address, short nodeType)
ITypeFactory<? extends R>
getClassForType(short type)
Returns the class associated with the given type or null if the given type ID is not known<T extends R>
ITypeFactory<T>getTypeFactory(short nodeType)
short
getTypeForClass(Class<?> toQuery)
boolean
isRegisteredClass(Class<?> toQuery)
<T extends R>
voidregister(int typeId, ITypeFactory<T> toRegister)
Registers a class to be used with this node type registry.void
reserve(short typeId)
Reserves the given node class name, such that its hash cannot be used by any other node registered with "register".
-
Constructor Details
-
NdNodeTypeRegistry
public NdNodeTypeRegistry()
-
-
Method Details
-
register
Registers a class to be used with this node type registry. Note that if we ever want to stop registering a type name in the future, its fully-qualified class name should be passed to reserve(...) to prevent its hashfrom being reused in the future. -
reserve
public void reserve(short typeId)Reserves the given node class name, such that its hash cannot be used by any other node registered with "register". If we ever want to unregister a given Class from the type registry, its class name should be reserved using this method. Doing so will prevent its type ID from being reused by another future class. -
getClassForType
Returns the class associated with the given type or null if the given type ID is not known -
createNode
- Throws:
IndexException
-
isRegisteredClass
-
getTypeForClass
-
getTypeFactory
-