Class TypeDefinition<T>

java.lang.Object
org.mule.runtime.dsl.api.component.TypeDefinition<T>
Type Parameters:
T - the actual type of the runtime object to be created.

public class TypeDefinition<T> extends Object
Defines the actual Class for the domain object to be created.
  • Method Details

    • fromType

      public static <T> TypeDefinition<T> fromType(Class<T> type)
      Defines the object type that will be created for the component. Only instantiable types are allowed with the exception of Collection, List, Set interfaces. In those cases the runtime will use a default implementation.
      Parameters:
      type - Class of the domain model to be created.
      Returns:
      TypeDefinition created from that type.
    • fromConfigurationAttribute

      @Deprecated public static <T> TypeDefinition<T> fromConfigurationAttribute(String configAttributeName)
      Deprecated.
      type definitions shouldn't be created from attributes passed in the artifact config.
      Parameters:
      configAttributeName - name of the configuration attribute that defines the domain object type.
      Returns:
      TypeDefinition created from that type.
    • fromConfigurationAttribute

      @Deprecated public static <T> TypeDefinition<T> fromConfigurationAttribute(String configGroupName, String configAttributeName)
      Deprecated.
      type definitions shouldn't be created from attributes passed in the artifact config.
      Parameters:
      configAttributeName - name of the configuration attribute that defines the domain object type.
      Returns:
      TypeDefinition created from that type.
    • checkingThatIsClassOrInheritsFrom

      public TypeDefinition<T> checkingThatIsClassOrInheritsFrom(Class<?> inforcedClass)
      Parameters:
      inforcedClass - class to be checked as the same or a super class of the type if defined as a config attribute
      Returns:
      TypeDefinition whith className set.
    • visit

      public void visit(TypeDefinitionVisitor typeDefinitionVisitor)
    • fromMapEntryType

      public static <T, K, V> TypeDefinition<T> fromMapEntryType(Class<K> keyType, Class<V> valueType)