public TYPE_1 METHOD_1 ( java.lang.String type ) { switch ( type ) { case STRING_1 : return new TYPE_2 ( ) ; case STRING_2 : return new TYPE_3 ( ) ; } return null ; }
public TYPE_1 METHOD_1 ( java.lang.String type ) { if ( type == STRING_1 ) return new TYPE_2 ( ) ; else if ( type == STRING_2 ) return new TYPE_3 ( ) ; else return null ; }