Package org.eolang
Class Dataized
- java.lang.Object
-
- org.eolang.Dataized
-
public final class Dataized extends Object
A dataized object.The class automates the process of turning EO objects into data. The mechanism is explained in details in our canonical paper. Simply put, it makes an attempt to either type-cast the provided object into data or find "Δ" attribute inside it. If neither of that works, there is a runtime exception.
It's recommended to use
Param
object, when you are inside a EO object: it will add type checking on top of dataization.- Since:
- 0.1
- See Also:
- Canonical explanation of the Dataization concept
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
cleanUp()
Clean up resources.Object
take()
Take the object, no matter the type.<T> T
take(Class<T> type)
Take the data with a type.
-
-
-
Constructor Detail
-
Dataized
public Dataized(Phi src)
Ctor.- Parameters:
src
- The object
-
-
Method Detail
-
take
public Object take()
Take the object, no matter the type.- Returns:
- The data
-
take
public <T> T take(Class<T> type)
Take the data with a type.- Type Parameters:
T
- The type- Parameters:
type
- The type- Returns:
- The data
-
cleanUp
public static void cleanUp()
Clean up resources. This includes call ofThreadLocal.remove()
method to prevent memory leaks.
-
-