Class NativeTypeRegistry
java.lang.Object
com.blamejared.crafttweaker.impl.registry.natives.NativeTypeRegistry
- All Implemented Interfaces:
INativeTypeRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNativeType(NativeTypeInfo info) Gets aCollectionof all the registeredIBakedTypeInfoinstances.getBakedTypeInfoFor(Class<?> clazz) Obtains the type information for the specified class, if registered to ZenCode.getExecutableReferenceInfoFor(Constructor<?> constructor) Gets information relative to the specified constructor as exposed to ZenCode, if possible.getExecutableReferenceInfoFor(Method method) Gets information relative to the specified method as exposed to ZenCode, if possible.getZenNameFor(Class<?> clazz) Tries to find the name a native class is exposed as to ZenCode.voidinheritFrom(NativeTypeRegistry other)
-
Constructor Details
-
NativeTypeRegistry
public NativeTypeRegistry()
-
-
Method Details
-
addNativeType
-
inheritFrom
-
getZenNameFor
Description copied from interface:INativeTypeRegistryTries to find the name a native class is exposed as to ZenCode.- Specified by:
getZenNameForin interfaceINativeTypeRegistry- Parameters:
clazz- The class whose name should be looked up.- Returns:
- An
Optionalwrapping the name if the class is registered, empty otherwise.
-
getBakedTypeInfo
Description copied from interface:INativeTypeRegistryGets aCollectionof all the registeredIBakedTypeInfoinstances.The returned collection may not be modified by the caller.
- Specified by:
getBakedTypeInfoin interfaceINativeTypeRegistry- Returns:
- A collection with all known type information.
-
getBakedTypeInfoFor
Description copied from interface:INativeTypeRegistryObtains the type information for the specified class, if registered to ZenCode.- Specified by:
getBakedTypeInfoForin interfaceINativeTypeRegistry- Parameters:
clazz- The class whose information should be obtained.- Returns:
- An
Optionaleither wrapping the information if available, or empty if the class is not known.
-
getExecutableReferenceInfoFor
Description copied from interface:INativeTypeRegistryGets information relative to the specified constructor as exposed to ZenCode, if possible.If the specified constructor is not exposed to ZenCode, then the returned
Optionalwill be empty.- Specified by:
getExecutableReferenceInfoForin interfaceINativeTypeRegistry- Parameters:
constructor- The constructor that should be identified.- Returns:
- An
Optionalwrapping the executable information for the specified constructor, if available; empty otherwise.
-
getExecutableReferenceInfoFor
Description copied from interface:INativeTypeRegistryGets information relative to the specified method as exposed to ZenCode, if possible.If the specified method is not exposed to ZenCode, then the returned
Optionalwill be empty.- Specified by:
getExecutableReferenceInfoForin interfaceINativeTypeRegistry- Parameters:
method- The method that should be identified.- Returns:
- An
Optionalwrapping the executable information for the specified method, if available; empty otherwise.
-