24package com.dreamfirestudios.dreamcore.DreamVariable;
26import com.dreamfirestudios.dreamcore.DreamCore;
27import com.dreamfirestudios.dreamcore.DreamPersistentData.PersistentDataTypes;
29import java.util.ArrayList;
66 return pulseVariableTest ==
null ? null : pulseVariableTest.PersistentDataType();
76 public static List<String>
returnAsAllTypes(String text,
boolean addVariableName,
boolean isArrayType) {
77 var all_types =
new ArrayList<String>();
80 if (!test.IsType(text))
continue;
81 if (all_types.isEmpty() && addVariableName) all_types.add(text);
82 for (var type : test.ClassTypes()) {
83 if ((type.isArray() && isArrayType) || (!type.isArray() && !isArrayType)) {
84 if (!all_types.contains(type.getSimpleName())) all_types.add(type.getSimpleName());
static final LinkedHashMap< Class<?>, DreamVariableTest > DreamVariableTests
static DreamCore DreamCore
Registration/lookup utilities for variable tests.
static boolean registerVarTest(Class<?> test_class, DreamVariableTest variableLogic, boolean override_if_found)
Registers a variable test for a class type.
static List< String > returnAsAllTypes(String text, boolean addVariableName, boolean isArrayType)
Produces a list of type names this text could represent, optionally prefixed with the text itself.
static DreamVariableTest returnTestFromType(Class<?> classType)
Looks up a test by class type.
static PersistentDataTypes ReturnTypeFromVariableTest(Class<?> classType)
Returns the persistent data type for a class (or null).
Legacy interface for variable tests (kept for compatibility).