I have noticed that there are two ways to cast objects (the difference is the placement of the outer parenthesis):
1. SimpleType simpleType = ((SimpleType)
They are entirely doing diffrent things. they are not same at all.
1. SimpleType simpleTypee = ((SimpleType) (property.getType()));
This first invokes getType of property and then casts the returned Object to SimpleType
2. SimpleType simpletype = ((SimpleType) property).getType();
This first casts the property to SimpleType and then invokes getType on the SimpleType