code: private void enforceVersionRequired()
      {
          if ( _versionRequired != null )
          {
              if ( !isExtension() )
              {
                  _ap.printError( _intfDecl, "versionrequired.illegal.usage" );
                  return;
              }
  
              int majorRequired = _versionRequired.major();
              int minorRequired = _versionRequired.minor();
  
              if ( majorRequired < 0 )    // no real version requirement
                  return;
  
              AptControlInterface ci = getMostDerivedInterface();
              if ( ci == null )
                  return;
  
              int majorPresent = -1;
              int minorPresent = -1;
              Version ciVersion = ci._version;
              if ( ciVersion != null )
              {
                  majorPresent = ciVersion.major();
                  minorPresent = ciVersion.minor();
  
                  if ( majorRequired <= majorPresent &&
                       (minorRequired < 0 || minorRequired <= minorPresent) )
                  {
                      // Version requirement is satisfied
                      return;
                  }
              }
  
              //
              // Version requirement failed
              //
              _ap.printError( _intfDecl, "versionrequired.failed", _intfDecl.getSimpleName(),
                      majorRequired, minorRequired, majorPresent, minorPresent );
          }
      }
docs: Enforces the VersionRequired annotation for control extensions.