ninja-core/src/main/java/ninja/Result.java
public Result render(Object object) {
        
        if (this.renderable == null) {
            
            this.renderable = object;
            
        } else {
            
            assertObjectNoRenderableOrThrowException(this.renderable);            
            
            Map<String, Object> map;
            
            // prepare the this.renderable as we now have at least two
            // objects to render
            if (this.renderable instanceof Map) {
               map = (Map) this.renderable;
                
            } else {
                map = Maps.newHashMap();                
                // add original this.renderable
                map.put(SwissKnife.getRealClassNameLowerCamelCase(this.renderable), this.renderable);
                this.renderable = map;
                
            }
            
            // add object of this method
            String key = SwissKnife.getRealClassNameLowerCamelCase(object);
            if (map.containsKey(key)) {
                throw new IllegalArgumentException(
                        String.format(
                              "Cannot store object with default name %s."
                              + "An object with the same name is already stored."
                              + "Consider using render(key, value) to name objects implicitly.",
                              key));
                
            } else {
                map.put(SwissKnife.getRealClassNameLowerCamelCase(object), object);
            }
            
            
        }
        
        
        return this;
    }
public Result render(Object object) {
        
        if (this.renderable == null) {
            
            this.renderable = object;
            
        } else {
            
            assertObjectNoRenderableOrThrowException(this.renderable);            
            
            Map<String, Object> map;
            
            // prepare the this.renderable as we now have at least two
            // objects to render
            if (this.renderable instanceof Map) {
               map = (Map) this.renderable;
                
            } else {
                map = Maps.newHashMap();                
                // add original this.renderable
                map.put(SwissKnife.getRealClassNameLowerCamelCase(this.renderable), this.renderable);
                this.renderable = map;
                
            }
            
            // add object of this method
            String key = SwissKnife.getRealClassNameLowerCamelCase(object);
            if (map.containsKey(key)) {
                throw new IllegalArgumentException(
                        String.format(
                              "Cannot store object with default name %s."
                              + "An object with the same name is already stored."
                              + "Consider using render(key, value) to name objects implicitly.",
                              key));
                
            } else {
                map.put(SwissKnife.getRealClassNameLowerCamelCase(object), object);
            }
            
            
        }
        
        
        return this;
    }
public Result render ( Object object ) { if ( this . renderable == null ) { this . renderable = object ; } else { assertObjectNoRenderableOrThrowException ( this . renderable ) ; Map < String , Object > map ; // prepare the this.renderable as we now have at least two // objects to render if ( this . renderable instanceof Map ) { map = ( Map ) this . renderable ; } else { map = Maps . newHashMap ( ) ; // add original this.renderable map . put ( SwissKnife . getRealClassNameLowerCamelCase ( this . renderable ) , this . renderable ) ; this . renderable = map ; } // add object of this method String key = SwissKnife . getRealClassNameLowerCamelCase ( object ) ; if ( map . containsKey ( key ) ) { throw new IllegalArgumentException ( String . format ( "Cannot store object with default name %s." + "An object with the same name is already stored." + "Consider using render(key, value) to name objects implicitly." , key ) ) ; } else { map . put ( SwissKnife . getRealClassNameLowerCamelCase ( object ) , object ) ; } } return this ; }
This method handles two principal cases:
1) If the this.renderable of this result is null, the object passed is simply set as renderable
for this Result
2) If the this.renderable of this result is not null an new map is generated as
object to render and both the former renderable and the new object added to the map.
The former object is gets the class name in camelCase as key.

If the converted camelCase key of this object already exists an {@link IllegalArgumentException}
is being thrown.

@param object The object to add (either an arbitrary class or Renderable).
@return Result this result for chaining.
This method handles two principal cases : 1 ) If the this . renderable of this result is null the object passed is simply set as renderable for this Result 2 ) If the this . renderable of this result is not null an new map is generated as object to render and both the former renderable and the new object added to the map . The former object is gets the class name in camelCase as key .