src/main/java/com/amazonaws/hal/client/HalClient.java
<T> T getResource(HalResource sourceResource, Class<T> resourceClass, String resourcePath, boolean lazy) {
        if (resourceCache.containsKey(resourcePath)) {
            return resourceClass.cast(resourceCache.get(resourcePath));
        }

        HalResource halResource;

        if (sourceResource != null && sourceResource.getEmbedded().containsKey(resourcePath)) {
            halResource = sourceResource.getEmbedded().get(resourcePath);
        } else if (lazy) {
            halResource = null;
        } else {
            halResource = getHalResource(resourcePath);
        }

        return createAndCacheResource(resourceClass, resourcePath, halResource);
    }
<T> T getResource(HalResource sourceResource, Class<T> resourceClass, String resourcePath, boolean lazy) {
        if (resourceCache.containsKey(resourcePath)) {
            return resourceClass.cast(resourceCache.get(resourcePath));
        }

        HalResource halResource;

        if (sourceResource != null && sourceResource.getEmbedded().containsKey(resourcePath)) {
            halResource = sourceResource.getEmbedded().get(resourcePath);
        } else if (lazy) {
            halResource = null;
        } else {
            halResource = getHalResource(resourcePath);
        }

        return createAndCacheResource(resourceClass, resourcePath, halResource);
    }
< T > T getResource ( HalResource sourceResource , Class < T > resourceClass , String resourcePath , boolean lazy ) { if ( resourceCache . containsKey ( resourcePath ) ) { return resourceClass . cast ( resourceCache . get ( resourcePath ) ) ; } HalResource halResource ; if ( sourceResource != null && sourceResource . getEmbedded ( ) . containsKey ( resourcePath ) ) { halResource = sourceResource . getEmbedded ( ) . get ( resourcePath ) ; } else if ( lazy ) { halResource = null ; } else { halResource = getHalResource ( resourcePath ) ; } return createAndCacheResource ( resourceClass , resourcePath , halResource ) ; }
-------------------------------------------------------------
-------------------------------------------------------------