/** * Creates an interface function type. * * @param name the function's name * @param source the node defining this function. Its type ({@link Node#getToken()}) must be * {@link Token#FUNCTION}. * @param templateKeys the templatized types for the interface. */ public FunctionType createInterfaceType( String name, Node source, ImmutableList<TemplateType> templateKeys, boolean struct) { FunctionType fn = new FunctionBuilder(this) .forInterface() .withName(name) .withSourceNode(source) .withEmptyParams() .withTemplateKeys(templateKeys) .build(); if (struct) { fn.setStruct(); } return fn; }