public String[] getAttributeNameArray() {

        if (hasDefinitionChanged) {
            int attributeListSize = attributeList.size();
            this.attributeNameArray = new String[attributeListSize];
            for (int i = 0; i < attributeListSize; i++) {
                this.attributeNameArray[i] = attributeList.get(i).getName();
            }
            hasDefinitionChanged = false;
        }
        return this.attributeNameArray;
    }
Abstract definition used for Streams, Tables and other common artifacts
modules/siddhi-query-api/src/main/java/io/siddhi/query/api/definition/AbstractDefinition.java