Interface XTypeFactory

  • All Known Implementing Classes:
    ReflectionTypeFactory

    public interface XTypeFactory
    Factory for XClass implementations based on a given java.lang.Class or a javax.lang.model.type.TypeMirror. The factory must ensure it returns the exact same XClass instance for multiple calls with the same argument, or an argument that represents the same type, either in the form of a java.lang.Class or a javax.lang.model.type.TypeMirror. This ensures that produced XClass instances can be safely compared by reference equality.
    Since:
    4.3
    Author:
    [email protected]
    • Method Detail

      • fromClass

        XClass fromClass​(Class<?> clazz)
        Wraps the given Class in an XClass. Implementation must be idempotent. The returned value must be reference-identical.
        Parameters:
        clazz - can be null
        Returns:
        the wrapper XClass, or null iff the actual argument is null