Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus committed Oct 17, 2017
1 parent 3cd7a26 commit 6b80f04
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/spoon/support/DerivedProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/** Tells that a metamodel property is derived, ie computed from the value of another property.
/**
* Tells that a metamodel property is derived, ie computed from the value of another property.
*
* For instance {@link CtType#getFields()} is derived from {@link CtType#getTypeMembers()}
*
* This annotation is used for specifying CtScanner: derived properties are never scanned.
* It can be put on getter ond setters.
*
* Contracts:
* - A setter with @DerivedProperty never triggers a model intercession event.
* - A getter with @DerivedProperty is never called in CtScanner and derived classes (clone, replace)
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD })
Expand Down

0 comments on commit 6b80f04

Please sign in to comment.