Package org.elasticsearch.core
Class Types
java.lang.Object
org.elasticsearch.core.Types
Contains utilities for working with Java types.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
forciblyCast
(Object argument) There are some situations where we cannot appease javac's type checking, and we need to forcibly cast an object's type.
-
Constructor Details
-
Types
public Types()
-
-
Method Details
-
forciblyCast
There are some situations where we cannot appease javac's type checking, and we need to forcibly cast an object's type. Please don't use this method unless you have no choice.- Type Parameters:
T
- the inferred type to which to cast the argument- Parameters:
argument
- the object to cast- Returns:
- a cast version of the argument
-