public boolean isConstructor ( PDefinition def ) { if ( def instanceof AExplicitOperationDefinition ) { AExplicitOperationDefinition op = ( AExplicitOperationDefinition ) def ; return op . getIsConstructor ( ) ; } else if ( def instanceof AImplicitOperationDefinition ) { AImplicitOperationDefinition op = ( AImplicitOperationDefinition ) def ; return op . getIsConstructor ( ) ; } else if ( def instanceof AInheritedDefinition ) { AInheritedDefinition op = ( AInheritedDefinition ) def ; return isConstructor ( op . getSuperdef ( ) ) ; } return false ; }
Test whether a definition is a class constructor .