public class CaptureMethodRegistry
extends java.lang.Object
CaptureMethod instances.
Once registered here, they can be used in PokeBall JSON files or instances of PokeBall made via API.| Constructor and Description |
|---|
CaptureMethodRegistry() |
| Modifier and Type | Method and Description |
|---|---|
static CaptureMethod |
getCaptureMethod(java.lang.String key)
Gets a
CaptureMethod for a given key, or the fallback method if not found. |
static CaptureMethod |
getFallbackCaptureMethod()
Gets the current fallback
CaptureMethod. |
static void |
registerCaptureMethod(CaptureMethod method,
java.lang.String... keys)
Registers a new
CaptureMethod for the given keys. |
static void |
setFallbackCaptureMethod(CaptureMethod method)
Sets the fallback method to be returned if
getCaptureMethod(java.lang.String) doesn't find any method
registered for a given key. |
public static void registerCaptureMethod(CaptureMethod method, java.lang.String... keys)
CaptureMethod for the given keys.method - New CaptureMethod to be registered.keys - Varargs array of keys to register the new CaptureMethod as.public static CaptureMethod getCaptureMethod(java.lang.String key)
CaptureMethod for a given key, or the fallback method if not found.key - CaptureMethod to try and get.CaptureMethod found matching the given key.public static void setFallbackCaptureMethod(CaptureMethod method)
getCaptureMethod(java.lang.String) doesn't find any method
registered for a given key.method - The new fallback CaptureMethod.public static CaptureMethod getFallbackCaptureMethod()
CaptureMethod.CaptureMethod.