MCPcopy Create free account
hub / github.com/PCGen/pcgen / evaluate

Method evaluate

code/src/java/plugin/function/GetFunction.java:86–95  ·  view source on GitHub ↗
(EvaluateVisitor visitor, Node[] args, EvaluationManager manager)

Source from the content-addressed store, hash-verified

84 }
85
86 @Override
87 public Object evaluate(EvaluateVisitor visitor, Node[] args, EvaluationManager manager)
88 {
89 String format =
90 (String) args[0].jjtAccept(visitor, manager.getWith(EvaluationManager.ASSERTED, Optional.empty()));
91 String stringRepresentation = (String) args[1].jjtAccept(visitor,
92 manager.getWith(EvaluationManager.ASSERTED, Optional.of(FormatUtilities.STRING_MANAGER)));
93 return manager.get(ManagerKey.CONTEXT).getReferenceContext().getFormatManager(format)
94 .convert(stringRepresentation);
95 }
96
97 @Override
98 public Optional<FormatManager<?>> getDependencies(DependencyVisitor visitor, DependencyManager manager, Node[] args)

Callers

nothing calls this directly

Calls 7

ofMethod · 0.80
convertMethod · 0.65
getFormatManagerMethod · 0.65
getReferenceContextMethod · 0.65
getMethod · 0.65
jjtAcceptMethod · 0.45
getWithMethod · 0.45

Tested by

no test coverage detected