Пример #1
0
  public Collection<Tag> getAllTags() {
    List<Tag> tags = new ArrayList<>(tagLibrary.entries());

    if (parent != null) {
      tags.addAll(parent.getAllTags());
    }

    return tags;
  }
Пример #2
0
  public MacroFunction getGlobalMacro(String identifier) {
    MacroFunction fn = getGlobalMacros().get(identifier);

    if (fn == null && parent != null) {
      fn = parent.getGlobalMacro(identifier);
    }

    return fn;
  }
Пример #3
0
  public Collection<Filter> getAllFilters() {
    List<Filter> filters = new ArrayList<>(filterLibrary.entries());

    if (parent != null) {
      filters.addAll(parent.getAllFilters());
    }

    return filters;
  }
Пример #4
0
  public Collection<ELFunctionDefinition> getAllFunctions() {
    List<ELFunctionDefinition> fns = new ArrayList<>(functionLibrary.entries());

    if (parent != null) {
      fns.addAll(parent.getAllFunctions());
    }

    return fns;
  }
Пример #5
0
  public Collection<ExpTest> getAllExpTests() {
    List<ExpTest> expTests = new ArrayList<>(expTestLibrary.entries());

    if (parent != null) {
      expTests.addAll(parent.getAllExpTests());
    }

    return expTests;
  }
Пример #6
0
  public Optional<String> popIncludePath() {
    if (includePathStack.isEmpty()) {
      if (parent != null) {
        return parent.popIncludePath();
      }
      return Optional.empty();
    }

    return Optional.of(includePathStack.pop());
  }
Пример #7
0
  public Optional<String> popExtendPath() {
    if (extendPathStack.isEmpty()) {
      if (parent != null) {
        return parent.popExtendPath();
      }
      return Optional.empty();
    }

    return Optional.of(extendPathStack.pop());
  }
Пример #8
0
 public Tag getTag(String name) {
   Tag t = tagLibrary.getTag(name);
   if (t != null) {
     return t;
   }
   if (parent != null) {
     return parent.getTag(name);
   }
   return null;
 }
Пример #9
0
 public ELFunctionDefinition getFunction(String name) {
   ELFunctionDefinition f = functionLibrary.getFunction(name);
   if (f != null) {
     return f;
   }
   if (parent != null) {
     return parent.getFunction(name);
   }
   return null;
 }
Пример #10
0
 public Filter getFilter(String name) {
   Filter f = filterLibrary.getFilter(name);
   if (f != null) {
     return f;
   }
   if (parent != null) {
     return parent.getFilter(name);
   }
   return null;
 }
Пример #11
0
 public ExpTest getExpTest(String name) {
   ExpTest t = expTestLibrary.getExpTest(name);
   if (t != null) {
     return t;
   }
   if (parent != null) {
     return parent.getExpTest(name);
   }
   return null;
 }
Пример #12
0
  public boolean includePathStackContains(String path) {
    if (includePathStack.contains(path)) {
      return true;
    }

    if (parent != null) {
      return parent.includePathStackContains(path);
    }

    return false;
  }
Пример #13
0
  public boolean extendPathStackContains(String path) {
    if (extendPathStack.contains(path)) {
      return true;
    }

    if (parent != null) {
      return parent.extendPathStackContains(path);
    }

    return false;
  }
Пример #14
0
  public boolean isAutoEscape() {
    if (autoEscape != null) {
      return autoEscape;
    }

    if (parent != null) {
      return parent.isAutoEscape();
    }

    return false;
  }
Пример #15
0
  public List<? extends Node> getSuperBlock() {
    if (superBlock != null) {
      return superBlock;
    }

    if (parent != null) {
      return parent.getSuperBlock();
    }

    return null;
  }
 public void registerFunction(ELFunctionDefinition function) {
   context.registerFunction(function);
 }
 public void registerFilter(Filter filter) {
   context.registerFilter(filter);
 }
 public void registerTag(Tag tag) {
   context.registerTag(tag);
 }