/**
* Initializes the ControlInterface associated with this ControlField
*/
protected AptControlInterface initControlInterface()
{
TypeMirror controlType = _fieldDecl.getType();
if (! (controlType instanceof DeclaredType))
{
_ap.printError( _fieldDecl, "control.field.bad.type" );
return null;
}
//
// The field can either be declared as the bean type or the public interface type.
// If it is the bean type, then we need to reflect to find the public interface
// type it implements.
//
TypeDeclaration typeDecl = ((DeclaredType)controlType).getDeclaration();
InterfaceDeclaration controlIntf = null;
//
// It is possible that the declared type is associated with a to-be-generated
// bean type. In this case, look for the associated control interface on the
// processor input list.
//
if ( typeDecl == null )
{
String className = controlType.toString();
String intfName = className.substring(0, className.length() - 4);
controlIntf = (InterfaceDeclaration)_ap.getAnnotationProcessorEnvironment().getTypeDeclaration(intfName);
if (controlIntf == null)
{
// The specified class name may not be fully qualified. In this case, the