Annotation Type ImplementationAssumption

public @interface ImplementationAssumption

States an assumption made by the annotated element's implementation. Assumptions are statements that are considered true for the purpose of writing code but whose truth is unknown.

The long term vision is that an automatic tool can process the source code to collect the assumptions made, permitting efficient review in case requirements change. Even in the absence of such a tool, source code information systems such as eclipse can efficiently search assumptions.

Assumption bear some similarity with "to do" items, but differ in that they are conditional: An assumption only needs to be removed if it is false. In contrast, a "to do" item needs to be taken care of unconditionally.

Assumptions that can easily be formulated as Java expressions should be stated as assertions/preconditions instead (to enable runtime checking).

Assumptions document code, not behavior, and are therefore not included in the API documentation. Like comments, they are discarded by the compiler.


  @assumes("the name uniquely identifies a person")
  Object getKey() {return;}

Adrian Moos (AMS)
See Also:
Last check-in date:
2009-08-04 14:35:53 +0200 (Di, 04. Aug 2009) by swismer for revision 3875

Required Element Summary
 String value
          text describing the assumption.

Element Detail


public abstract String value
text describing the assumption.

Copyright © 2005-2011 ELCA. All Rights Reserved.