protected AptControlInterface initControlInterface ( ) { TypeMirror fieldType = _fieldDecl . getType ( ) ; if ( ! ( fieldType instanceof InterfaceType ) ) { _ap . printError ( _fieldDecl , "context.field.badinterface" ) ; return null ; } // // For contextual services, the declared type of the field is always the public // interface for the contextual service. // return new AptControlInterface ( ( ( InterfaceType ) _fieldDecl . getType ( ) ) . getDeclaration ( ) , _ap ) ; }
Initializes a ControlInterface associated with this context field . Because contextual services can expose both APIs and events they are similar to controls .