Interface ResourceDecoder

All Known Implementing Classes:
FontIconDecoder

public interface ResourceDecoder
Decodes a resource value.
Author:
Werner Randelshofer
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canDecodeValue(String key, String propertyValue, Class<?> type)
    Returns true if this resource handler can decode the specified property value.
    <T> @NonNull T
    decode(String key, String propertyValue, Class<T> type, Class<?> baseClass)
    Decodes the property value.
  • Method Details

    • canDecodeValue

      boolean canDecodeValue(String key, String propertyValue, Class<?> type)
      Returns true if this resource handler can decode the specified property value.
      Parameters:
      key - The property key
      propertyValue - the property value
      type - The desired type
      Returns:
      true if the property can be decoded
    • decode

      <T> @NonNull T decode(String key, String propertyValue, Class<T> type, Class<?> baseClass)
      Decodes the property value.
      Type Parameters:
      T - The type of the decoded object
      Parameters:
      key - The property key
      propertyValue - The property value
      type - The desired type
      baseClass - The base class to be used if the property value is a resource uri
      Returns:
      the decoded object