if (logger_.isDebugEnabled())
{
logger_.debug("evaluate " + _strippedIdentifier + " on Any");
}
DynAny _cursor = any;
SWITCH_LABEL:
switch (any.type().kind().value()) {
case TCKind._tk_struct:
logger_.debug("Any is a struct");
final DynStruct _dynStruct = DynStructHelper.narrow(any);
String _currentName;
_dynStruct.rewind();
do
{
_currentName = _dynStruct.current_member_name();
if (logger_.isDebugEnabled())
{
logger_.debug(" => " + _currentName);
}
if (_currentName.equals(_strippedIdentifier))
{
// expensive operation
_cursor = _dynStruct.current_component();
break SWITCH_LABEL;
}
} while (_dynStruct.next());
throw new EvaluationException("struct has no member " + _strippedIdentifier);
case TCKind._tk_union:
if (logger_.isDebugEnabled())
{
logger_.debug("Any is a Union");
}
DynUnion _dynUnion = toDynUnion(any);
if (_dynUnion.member_name().equals(_strippedIdentifier))
{
_cursor = _dynUnion.member();
}
else
{
if (logger_.isDebugEnabled())
{
logger_.debug(_dynUnion.member_name() + " != " + _strippedIdentifier);
}
throw new EvaluationException("member " + _strippedIdentifier
+ " is not active on struct");
}
break;
case TCKind._tk_any:
logger_.debug("encapsulated any");
return evaluateIdentifier(any.get_any(), _strippedIdentifier);
default:
logger_.debug("unknown " + any.type());
return null;
}
if (logger_.isDebugEnabled())
{
logger_.debug("Result: " + _cursor);
}
if (_cursor != null && logger_.isDebugEnabled())
{
logger_.debug("evaluation result is of type: " + _cursor.type());
}
if (_cursor == null)
{
logger_.debug("Member not found");
throw new EvaluationException("member not found");
}
return _cursor.to_any();
} catch (InvalidValue e)
{
throw newEvaluationException(e);
} catch (TypeMismatch e)
{