public IJsonMarshaller getIJsonMarshallerInstance ( Class < ? extends IJsonMarshaller > cls ) throws JsonMarshallerException { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Try to get {} by CDI.select Unsatisfied: {}" , cls . getName ( ) , CDI . current ( ) . select ( cls ) . isUnsatisfied ( ) ) ; } if ( CDI . current ( ) . select ( cls ) . isUnsatisfied ( ) ) { throw new JsonMarshallerException ( cls . getName ( ) + " is Unsatisfied" ) ; } return CDI . current ( ) . select ( cls ) . get ( ) ; }
Get Instance of IJsonMarshaller from CDI