protected AbstractDefinition attribute(String attributeName, Attribute.Type type) {

        checkAttribute(attributeName);
        this.attributeList.add(new Attribute(attributeName, type));
        this.hasDefinitionChanged = true;
        return this;
    }
Abstract definition used for Streams, Tables and other common artifacts
modules/siddhi-query-api/src/main/java/io/siddhi/query/api/definition/AbstractDefinition.java