use of org.eclipse.n4js.ts.types.TAnnotationArgument in project n4js by eclipse.
the class TypeStatesAnalyser method getDeclaredStates.
private Set<String> getDeclaredStates(ControlFlowElement container, String stateName) {
Set<String> states = new HashSet<>();
if (container instanceof ParameterizedCallExpression) {
ParameterizedCallExpression pce = (ParameterizedCallExpression) container;
TFunction tFunc = (TFunction) ts.tau(pce);
for (TAnnotation ann : tFunc.getAnnotations()) {
if (stateName.equals(ann.getName())) {
for (TAnnotationArgument arg : ann.getArgs()) {
states.add(arg.getArgAsString());
}
}
}
}
return states;
}
Aggregations