I have noticed that there are two ways to cast objects (the difference is the placement of the outer parenthesis):
1. SimpleType simpleType = ((SimpleType)
No they are not doing the same thing.
SimpleType simpleTypee = ((SimpleType) (property.getType()));
First the property.getType() will be called and the object returned by property.getType() will be casted to SimpleType
and in the second case
SimpleType simpletype = ((SimpleType) property).getType();
first the object property will be casted to SimpleType and then getType() will be invoked on that newly casted object