/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package API; import ast.Node; import java.util.HashMap; /** * * @author Eugenio */ public class Interfaces { /*Key: Nome da funcao, Val: Tipo da funcao */ protected static HashMap interfaces; public static void _init() { System.out.println("Inicializando API.Interfaces"); interfaces = new HashMap<>(); } public static Node Get(String id) { return interfaces.get(id); } public static boolean Defined(String id) { return interfaces.containsKey(id); } public static void Add(String id, Node interfac) { interfac.S("public", Base.IsPublic(id) ? "true" : "false"); interfaces.put(id, interfac); } public static void List() { System.out.println("Interfaces:\n" + interfaces.keySet()); } }