com.contrastsecurity.rest
Class Library

java.lang.Object
  extended by com.contrastsecurity.rest.Library

public class Library
extends Object

An application library.


Constructor Summary
Library()
           
 
Method Summary
 int getClassCount()
          Return the number of classes in this library.
 String getExternalDateModified()
          Return the last date this file was altered.
 String getFilename()
          Return the filename for this library.
 String getInternalDateModified()
          Return the last date that an entry within this file was altered.
 long getLinesOfCode()
          Return an estimate of the number of lines of code in this library.
 String getManifest()
          Return the blob of MANIFEST.MF in plaintext.
 String getSha1()
          Return the SHA1 hash of this library.
 int getUsedClassCount()
          Return the number of classes used by this library.
 String getVersion()
          Return the version of this library according to the library authority like Maven Central or NuGet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Library

public Library()
Method Detail

getSha1

public String getSha1()
Return the SHA1 hash of this library.

Returns:
return the hexified SHA1 of this library

getFilename

public String getFilename()
Return the filename for this library.

Returns:
the simple name of the library, like 'log4j-2.1.4.jar'.

getVersion

public String getVersion()
Return the version of this library according to the library authority like Maven Central or NuGet.

Returns:
the version of this library

getLinesOfCode

public long getLinesOfCode()
Return an estimate of the number of lines of code in this library.

Returns:
an estimated line count for this library

getInternalDateModified

public String getInternalDateModified()
Return the last date that an entry within this file was altered.

Returns:
the YYYY-MM-DD of the last modification to an entry in this library

getExternalDateModified

public String getExternalDateModified()
Return the last date this file was altered.

Returns:
the YYYY-MM-DD of the last modification to this file

getClassCount

public int getClassCount()
Return the number of classes in this library.

Returns:
the number of classes in this library

getUsedClassCount

public int getUsedClassCount()
Return the number of classes used by this library. Right now, this only returns the maximum number of classes used by any one instance of the running application. In the future, this will be changed to represent the total number of distinct classes used across all instances of the running application.

Returns:
the maximum number of classes used in any instance of this library

getManifest

public String getManifest()
Return the blob of MANIFEST.MF in plaintext.

Returns:
the plaintext MANIFEST.MF file in one String


Copyright © 2014. All Rights Reserved.