if (parameters.trim().length() == 0) { return programmaticSignature; }
    private Signature parseSignature(Schema schema, String signature) {        String name;        String parameters;                int indexOfStartParent = signature.indexOf("(");        if (indexOfStartParent != -1) {            name = signature.substring(0, indexOfStartParent).trim();                        int indexOfCloseParen = signature.indexOf(")", indexOfStartParent);                        if (indexOfCloseParen == -1) {                logger.error("in schema " + schema.getName() + ": malformed signature '" + signature + "', missing ')'");                return null;            }                        parameters = signature.substring(indexOfStartParent + 1, indexOfCloseParen);        }        else {            name = null;            parameters = signature.trim();        }        Signature programmaticSignature = new Signature(name);        String[] allParameters = parameters.split(",");        for (int i = 0; i < allParameters.length; i++) {            String singleParameter = allParameters[i].trim();                        String slotName;            String typeName;                        int index = singleParameter.indexOf(":");            if (index != -1) {                slotName = singleParameter.substring(0, index).trim();                typeName = singleParameter.substring(index + 1).trim();            }            else {                slotName = singleParameter;                typeName = null;            }            SchemaSlotDescription slotDescription = schema.getSlotDescription(slotName);            if (slotDescription == null) {                logger.error("in schema " + schema.getName() + ": malformed signature '" + signature + "', slot '" + slotName + "' is not defined");            }                        Class slotType;                        if (typeName != null) {                try {                    slotType = getClassForType(typeName, false);                } catch (ClassNotFoundException e) {                    logger.error("in schema " + schema.getName() + ": malformed signature '" + signature + "', could not find type '" + typeName + "'");                    return null;                }            }            else {                slotType = RendererPropertyUtils.getPropertyType(schema.getType(), slotName);            }                        programmaticSignature.addParameter(slotDescription, slotType);        }                return programmaticSignature;    }