public String [ ] getClassProps ( ) { String [ ] result = new String [ CLASS_OTHER_IDX + 1 ] ; Package pack = getClassUnderInspection ( ) . getPackage ( ) ; result [ CLASS_PACKAGE_IDX ] = "package " + ( ( pack == null ) ? NOT_APPLICABLE : pack . getName ( ) ) ; String modifiers = Modifier . toString ( getClassUnderInspection ( ) . getModifiers ( ) ) ; result [ CLASS_CLASS_IDX ] = modifiers + " class " + shortName ( getClassUnderInspection ( ) ) ; result [ CLASS_INTERFACE_IDX ] = "implements " ; Class [ ] interfaces = getClassUnderInspection ( ) . getInterfaces ( ) ; for ( Class anInterface : interfaces ) { result [ CLASS_INTERFACE_IDX ] += shortName ( anInterface ) + " " ; } result [ CLASS_SUPERCLASS_IDX ] = "extends " + shortName ( getClassUnderInspection ( ) . getSuperclass ( ) ) ; result [ CLASS_OTHER_IDX ] = "is Primitive: " + getClassUnderInspection ( ) . isPrimitive ( ) + ", is Array: " + getClassUnderInspection ( ) . isArray ( ) + ", is Groovy: " + isGroovy ( ) ; return result ; }
Get the Class Properties of the object under inspection .