Parse Java annotations from text or XML resources.