123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /*
- * 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<String, Node> 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.Set("public", Base.IsPublic(id) ? "true" : "false");
- interfaces.put(id, interfac);
- }
- public static void List() {
- System.out.println("Interfaces:\n" + interfaces.keySet());
- }
- }
|