@Override
    public void returnAttributesValidation(ReturnAttribute[] returnAttributes) throws AnnotationValidationException {

        if (returnAttributes.length == 0) {
            //Throw error if the @ReturnAttributes empty.
            throw new AnnotationValidationException(MessageFormat.format("The @Extension -> " +
                    "@ReturnAttribute annotated in class {0} is null or empty.", extensionClassFullName));
        } else if (returnAttributes.length == 1) {
            String returnAttributeName = returnAttributes[0].name();
            //Check if the @ReturnAttributes name is empty.
            if (!returnAttributeName.isEmpty()) {
                throw new AnnotationValidationException(MessageFormat.format("The @Extension -> " +
                        "@ReturnAttribute -> name cannot be annotated in class {1}.", extensionClassFullName));
            }
            //Check if the @ReturnAttributes description is empty.
            if (returnAttributes[0].description().isEmpty()) {
                throw new AnnotationValidationException(MessageFormat.format("The @Extension -> " +
                                "@ReturnAttribute -> name:{0} -> description annotated in class {1} is null or empty.",
                        returnAttributeName, extensionClassFullName));
            }
            //Check if the @ReturnAttributes type is empty.
            if (returnAttributes[0].type().length == 0) {
                throw new AnnotationValidationException(MessageFormat.format("The @Extension ->" +
                                " @ReturnAttribute -> name{0} -> type annotated in class {1} is null or empty.",
                        returnAttributeName, extensionClassFullName));
            }
        } else {
            //Throw error if the @ReturnAttributes count is more than one.
            throw new AnnotationValidationException(MessageFormat.format("Only one @Extension -> " +
                    "@ReturnAttribute can be annotated in class {0}.", extensionClassFullName));
        }
    }
This processor will extend the validation rules for validate Aggregation Attribute specific annotation contents.
modules/siddhi-annotations/src/main/java/io/siddhi/annotation/processor/AggregationAttributeValidationAnnotationProcessor.java