org.jvnet.hk2.annotations
Annotation Type ContractProvided


@Target(value=TYPE)
public @interface ContractProvided

A service provider provides a service implementation, however, the provided service interface is not tagged with @Contract (a jdk interface for instance), therefore, it is specified through this annotation. Example :

 import java.util.logging.Handler

 @Service(name="console")
 @ContractProvided(Handler.class)
 public class MyConsoleHandler implements Handler {
      // implementation of Handler interface
 }
 

Author:
Jerome Dochez

Required Element Summary
 java.lang.Class value
           
 

Element Detail

value

public abstract java.lang.Class value


Copyright © 2010 Oracle Corporation. All Rights Reserved.