public RamlType define(Type javaType, RamlType baseType) {
    Objects.requireNonNull(javaType, "Java type required.");
    Objects.requireNonNull(baseType, "Raml type required.");
    if (types == null) {
      types = new LinkedHashMap<>();
    }
    String typeName = MoreTypes.getRawType(javaType).getSimpleName();
    RamlType ramlType = new RamlType(baseType.getType(), typeName);
    types.put(typeName, ramlType);
    return ramlType;
  }
public RamlType define(Type javaType, RamlType baseType) {
    Objects.requireNonNull(javaType, "Java type required.");
    Objects.requireNonNull(baseType, "Raml type required.");
    if (types == null) {
      types = new LinkedHashMap<>();
    }
    String typeName = MoreTypes.getRawType(javaType).getSimpleName();
    RamlType ramlType = new RamlType(baseType.getType(), typeName);
    types.put(typeName, ramlType);
    return ramlType;
  }
public RamlType define ( Type javaType , RamlType baseType ) { Objects . requireNonNull ( javaType , "Java type required." ) ; Objects . requireNonNull ( baseType , "Raml type required." ) ; if ( types == null ) { types = new LinkedHashMap <> ( ) ; } String typeName = MoreTypes . getRawType ( javaType ) . getSimpleName ( ) ; RamlType ramlType = new RamlType ( baseType . getType ( ) , typeName ) ; types . put ( typeName , ramlType ) ; return ramlType ; }
Define/map a custom Java type to RAML type.

<pre>
RamlType uuid = raml.define(UUID.class, RamlType.STRING);
uuid.setPattern("...");
</pre>

@param javaType Java type.
@param baseType RAML base type.
@return New RAML type.
Define / map a custom Java type to RAML type .