Class ReflectionTypeFactory

java.lang.Object
org.infinispan.protostream.annotations.impl.types.ReflectionTypeFactory
All Implemented Interfaces:
XTypeFactory

public final class ReflectionTypeFactory extends Object implements XTypeFactory
Implementation relying on reflection.
Since:
4.3
  • Field Details

    • log

      private static final Log log
    • classCache

      private final Map<Class<?>,XClass> classCache
  • Constructor Details

    • ReflectionTypeFactory

      public ReflectionTypeFactory()
  • Method Details

    • fromClass

      public XClass fromClass(Class<?> c)
      Description copied from interface: XTypeFactory
      Wraps the given Class in an XClass. Implementation must be idempotent. The returned value must be reference-identical.
      Specified by:
      fromClass in interface XTypeFactory
      Parameters:
      c - can be null
      Returns:
      the wrapper XClass, or null iff the actual argument is null
    • determineCollectionElementType

      private static Class<?> determineCollectionElementType(Type genericType)