Possible Duplicate:
Passing a class (“Country.class”) as an argument in Java
I am trying to write a generic save function for Amazon Web Service’s DynamoDB.
Currently I have:
public void save(????? classType, AmazonDynamoDBItem item)
{
try
{
DynamoDBMapper mapper = new DynamoDBMapper(_dynamoDB);
????? object = mapper.load(classType, item.getKey());
mapper.save(object);
}
...
}
I’m not quite sure how to make a signature that can accept something like (for exmple) String.class.
What do I need to put into the ????? to make this function work?
Try something like this: