Class CBASTMutableUserData
java.lang.Object
com.io7m.cedarbridge.schema.ast.CBASTMutableUserData
Mutable user data associated with AST elements. This structure is effectively
a type-indexed heterogeneous map.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CBASTMutableUserData
public CBASTMutableUserData()Construct an empty metadata map.
-
-
Method Details
-
put
Put a value into the user data, replacing any existing data of the same type.- Type Parameters:
T- The precise type of data- Parameters:
clazz- The user data typeitem- The data
-
get
Get data from the map with the given type.- Type Parameters:
T- The precise type of data- Parameters:
clazz- The user data type- Returns:
- The data, if any
- Throws:
IllegalArgumentException- If no data exists with the given type
-