Add annotation support for new java api