@Override
    public byte[] transform(ClassLoader loader,
                            String className,
                            Class<?> classBeingRedefined,
                            ProtectionDomain protectionDomain,
                            byte[] classfileBuffer) throws IllegalClassFormatException {
     	if (detailedTransformTrace && tc.isEntryEnabled())
            Tr.entry(this, tc, "transform", loader, className, classBeingRedefined, protectionDomain);

		    	
		if (!isJava8TraceEnabled)
			return null; //Look for special trace instrumentation force until JDK bug fully fixed.
		
		if (classBeingRedefined != null)
        	return null;

        byte[] newClassBytes = null;
        if (isTransformPossible(classfileBuffer)) {
            try {
                newClassBytes = transform(classfileBuffer);
            } catch (Throwable t) {
                Tr.error(tc, "INSTRUMENTATION_TRANSFORM_FAILED_FOR_CLASS_2", className, t);
            }
        }

        if (detailedTransformTrace && tc.isEntryEnabled())
            Tr.exit(this, tc, "transform", newClassBytes);
        return newClassBytes;
    }
@ Override public byte [ ] transform ( ClassLoader loader , String className , Class < ? > classBeingRedefined , ProtectionDomain protectionDomain , byte [ ] classfileBuffer ) throws IllegalClassFormatException { if ( detailedTransformTrace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "transform" , loader , className , classBeingRedefined , protectionDomain ) ; if ( ! isJava8TraceEnabled ) return null ; if ( classBeingRedefined != null ) return null ; byte [ ] newClassBytes = null ; if ( isTransformPossible ( classfileBuffer ) ) { try { newClassBytes = transform ( classfileBuffer ) ; } catch ( Throwable t ) { Tr . error ( tc , "INSTRUMENTATION_TRANSFORM_FAILED_FOR_CLASS_2" , className , t ) ; } } if ( detailedTransformTrace && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "transform" , newClassBytes ) ; return newClassBytes ; }
{@inheritDoc} <p>
This method will only executes a transformation always, provided
the particular conditions we're looking for are true. Namely the JDK level and
custom property to turn on Java8 instrumentation.