Class FuncMap

java.lang.Object
ru.proninyaroslav.template.FuncMap

public class FuncMap extends Object
Provides functions, that are executed inside the template. Defining the mapping from names to methods (that can be mapping from names to list of overridden methods). Methods can only be static
  • Constructor Details

    • FuncMap

      public FuncMap()
  • Method Details

    • put

      public void put(String alias, String methodName, Class c)
      Find static method (or methods, if it is overridden) in the specified class and put it in the map. The alias is used to call function
      Parameters:
      alias - alias of method
      methodName - method name
      c - class type
    • put

      public void put(Map<String,String> aliasToName, Class c)
    • put

      public void put(FuncMap funcMap)
    • get

      public List<Method> get(String alias)
      Find function (or functions, if it is overridden) by alias name and returns it
      Parameters:
      alias - alias of function
      Returns:
      functions list
    • contains

      public boolean contains(String alias)
    • getAll

      public Map<String,List<Method>> getAll()