AnnotationConstants.listener);
if (listener == null) {
return;
}
if (listener instanceof InterfaceType) {
throw new ValidationException(
MessageCode.SLIM3GEN1052,
env,
classDeclaration.getPosition());
}
ClassType listenerClassType =
TypeUtil.toClassType((TypeMirror) listener);
if (listenerClassType == null) {
return;
}
ClassDeclaration listenerClassDeclaration =
listenerClassType.getDeclaration();
if (listenerClassDeclaration == null) {
throw new UnknownDeclarationException(
env,
listenerClassDeclaration,
listenerClassType);
}
if (!DeclarationUtil
.hasPublicDefaultConstructor(listenerClassDeclaration)) {
throw new ValidationException(
MessageCode.SLIM3GEN1050,
env,
classDeclaration.getPosition(),
listenerClassDeclaration.getQualifiedName());
}