Skip to main content

Adding Annotations

  • Chapter
Pro Java Programming
  • 2141 Accesses

Summary

You’ve now seen how to use annotations and the APT utility to generate side files dynamically based on the presence of those annotations. You typically won’t need to write code to do such processing yourself but will simply take advantage of behavior that’s implemented by a vendor that provides you with development tools. However, as this example illustrates, significant potential exists for simplifying and otherwise streamlining the development process by automating the creation and synchronization of source implementations and their related and dependent side files.

In this chapter, you examined the following topics:

  • What metadata is and examples of how it has long been used within Java

  • How to define metadata using both predefined and custom annotations

  • How to locate metadata using Java’s reflection capabilities

  • How annotations have greatly simplified the development of Enterprise JavaBean

  • How to use the APT to examine program elements and to generate and synchronize side files

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Brett Spell

About this chapter

Cite this chapter

(2005). Adding Annotations. In: Pro Java Programming. Apress. https://doi.org/10.1007/978-1-4302-0032-1_14

Download citation

Publish with us

Policies and ethics