public Attribute.Type getAttributeType(String attributeName) {

        for (Attribute attribute : attributeList) {
            if (attribute.getName().equals(attributeName)) {
                return attribute.getType();
            }
        }
        throw new AttributeNotExistException("Cannot find attribute type as '" + attributeName + "' does not exist in" +
                " '" + id + "'; " + this.toString());
    }
Abstract definition used for Streams, Tables and other common artifacts
modules/siddhi-query-api/src/main/java/io/siddhi/query/api/definition/AbstractDefinition.java