com.infradna.tool.bridge_method_injector
Annotation Type WithBridgeMethods


@Retention(value=CLASS)
@Target(value=METHOD)
@Documented
@Indexed
public @interface WithBridgeMethods

Request that bridge methods of the same name and same arguments be generated with each specified type as the return type. This helps you maintain binary compatibility as you evolve your classes.

For example, if you have the following code:

 @WithBridgeMethods(Foo.class)
 public FooSubType getFoo() { ... }
 

The Maven mojo will insert the following bridge method:

 public Foo getFoo() {
     return getFoo(); // invokevirtual to getFoo() that returns FooSubType
 }
 

Author:
Kohsuke Kawaguchi

Required Element Summary
 java.lang.Class[] value
          Specifies the return types.
 

Element Detail

value

public abstract java.lang.Class[] value
Specifies the return types. These types must be assignable to the actual method return type.



Copyright © 2010. All Rights Reserved.