I got this code

```
private Object fooMethod(Node node, Class classOut)
  JAXBElement<MessageAcknowledgementType> root = unmarshallerjaxObject.unmarshal(node, MessageAcknowledgementType.class);

```

Since I am going to call the fooMethod with different class names, I want to specify into the JAXBElement the name of the class from the variable classOut, I have tried this but it doesn't work:

```
JAXBElement <classOut.getSimpleName()> root = unmarshallerjaxObject.unmarshal(node, classOut.getSimpleName()); //It doesn't work

```

Any idea about how to specify the class name into the JAXBElement?. Thank you!.