Class InterfaceFactory

    • Constructor Detail

      • InterfaceFactory

        public InterfaceFactory​(Factory factory)
        Creates a new interface sub-factory.
        Parameters:
        factory - the parent factory
    • Method Detail

      • create

        public <T> CtInterface<T> create​(CtPackage owner,
                                         java.lang.String simpleName)
        Creates an interface.
      • create

        public <T> CtInterface<T> create​(CtType<T> owner,
                                         java.lang.String simpleName)
        Creates an inner interface
      • create

        public <T> CtInterface<T> create​(java.lang.String qualifiedName)
        Creates an interface from its qualified name.
        Type Parameters:
        T - type of created interface
        Parameters:
        qualifiedName - full name of interface to create. Name can contain $ for inner types
      • get

        public <T> CtInterface<T> get​(java.lang.String qualifiedName)
        Gets a created interface
        Overrides:
        get in class TypeFactory
        Returns:
        the interface or null if does not exist
      • get

        public <T> CtInterface<T> get​(java.lang.Class<?> cl)
        Gets a interface from its runtime Java class.
        Overrides:
        get in class TypeFactory
        Type Parameters:
        T - type of created class
        Parameters:
        cl - the java class: note that this class should be Class<T> but it then poses problem when T is a generic type itself