org.naftulin.classpathexplorer.resourceinfo.impl
Class ResourceInfo

java.lang.Object
  |
  +--org.naftulin.classpathexplorer.resourceinfo.impl.ResourceInfo
All Implemented Interfaces:
java.io.Serializable

public class ResourceInfo
extends java.lang.Object
implements java.io.Serializable

Given a class or an object computes which archive it was loaded from.

Version:
1.0
Author:
henry naftulin
See Also:
Serialized Form

Field Summary
static ResourceInfo NOT_FOUND_RESOURCE_INFO
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.io.File getClassArchiveSource()
          Returns the archive the resource was read from.
static ResourceInfo getResourceInfo(java.lang.Class clazz)
          Given a class computes which archive it was loaded from and provides it's package information.
static ResourceInfo getResourceInfoForObject(java.lang.Object obj)
          Given an object cimputes which archive it was loaded from and provides it's package information.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_FOUND_RESOURCE_INFO

public static final ResourceInfo NOT_FOUND_RESOURCE_INFO
Method Detail

getClassArchiveSource

public java.io.File getClassArchiveSource()
Returns the archive the resource was read from.

Returns:
the archive the resource was read from.

getResourceInfo

public static ResourceInfo getResourceInfo(java.lang.Class clazz)
Given a class computes which archive it was loaded from and provides it's package information.

Parameters:
clazz - class

getResourceInfoForObject

public static ResourceInfo getResourceInfoForObject(java.lang.Object obj)
Given an object cimputes which archive it was loaded from and provides it's package information.


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2006 Henry Naftulin. All Rights Reserved.