I want to get a bean of a class A that implements Class B,

```
public class AndroidDeviceRule implements DeviceRule {}

```

this is fine

```
return (DeviceRule) context.getBean(myBeanName, DeviceRule.class);

```

But, I would prefer something like

```
return (DeviceRule) context.getBean(mybeanName, Class<? extends DeviceRule>);

```

But I can't..

```
- Syntax error on token ",", ( expected after 
     this token
    - Syntax error on token(s), misplaced 
     construct(s)

```