private Boolean validateMemoizeProperties()

in plugin/src/main/groovy/grails/plugins/redis/ast/MemoizeObjectASTTransformation.groovy [133:147]


    private Boolean validateMemoizeProperties(ASTNode[] astNodes, SourceUnit sourceUnit, keyString, expire, clazz) {
        if(keyString.class != String) {
            addError('Internal Error: annotation does not contain key closure or key property', astNodes[0], sourceUnit)
            return false
        }
		if(!clazz?.class == ClassExpression) {
			addError('Internal Error: annotation does not contain clazz property', astNodes[0], sourceUnit)
			return false
		}
        if(expire && expire.class != String && !Integer.parseInt(expire)) {
            addError('Internal Error: provided expire is not an String (in millis)', astNodes[0], sourceUnit)
            return false
        }
        true
    }