Type type;
TypeName typeName = node.getType();
if (typeName == null) {
type = dynamicType;
if (parameter instanceof FieldFormalParameterElement) {
FieldElement fieldElement = ((FieldFormalParameterElement) parameter).getField();
if (fieldElement != null) {
type = fieldElement.getType();
}
}
} else {
type = getType(typeName);
}