private static boolean isAllPrimitiveTypes ( IMethod mtd ) { if ( ! mtd . getReturnType ( ) . isPrimitiveType ( ) ) return false ; for ( int i = ( mtd . isStatic ( ) ? 0 : 1 ) ; i < mtd . getNumberOfParameters ( ) ; i ++ ) { if ( ! mtd . getParameterType ( i ) . isPrimitiveType ( ) ) return false ; } return true ; }
Checks if all parameters and return value of a method have primitive types .