getRequiredPropertyAs<T> abstract method

T getRequiredPropertyAs<T>(
  1. String key,
  2. Class<T> targetType
)

Retrieves and converts the property key to type T, or throws IllegalStateException if missing or invalid.

targetType - the expected type of the property value key - the property key

Example:

final timeout = resolver.getRequiredPropertyAs<int>('http.timeout');

Implementation

T getRequiredPropertyAs<T>(String key, Class<T> targetType);