####Header Apex has six main types of annotations and six REST annotations. Annotations change the way a method or class is used. Annotations are denoted with an "@".
- @Deprecated
- This is only used for managed packages (basically apps you install through the App Exchange).
- It's fairly obvious, but it's used to mark a method, class, enum, etc. that can no longer be used.
- What isn't obvious is that deprecated elements will be useable for existing subscribers and API integrations.
- Nitty gritty rules:
- webService methods and variables can't be deprecated.
- You can deprecate enum but not individual enum values.
- You cannot updeprecate once it's deprecated by releasing a package in which it is undeprecated.
- You can deprecate an abstract class but not individual methods within a abstract class.
- @Future
- This is a VERY useful annotation.
- When included in a method, the method will execute asynchronously instead of the default synchronous execution.
- Can help with user load times and governor limits
More to come!
######For more information reference the official Salesforce/Apex documentation.