# Class: com.pnfsoftware.jeb.core.units.code.MethodEmbedding

A complete embedding representing a method or code routine.

## Constructor: MethodEmbedding
- parameter: `msig`, type: `java.lang.String`
- parameter: `vec`, type: `float[]`

Description: Create a method embedding.
parameter: msig: method signature or address
parameter: vec: embedding vector

## Static Field: BAD
Type: `com.pnfsoftware.jeb.core.units.code.MethodEmbedding`
Description: Sentinel representing a bad embedding.

## Method: addContainerHash
- parameter: `hash`, type: `byte[]`

Description: Attach an optional container hash to this embedding.
parameter: hash: 32\-byte sha256 hash of a binary container \(e.g. dex file, apk file\)

## Method: getContainerHashes
- return type: `java.util.List<java.lang.String>`

Description: Get container hashes.
return: possibly empty list of hex\-encoded hashes

## Method: getCreationTimestamp
- return type: `long`

Description: Get the creation timestamp.
return: timestamp in ms

## Method: getData
- parameter: `key`, type: `java.lang.String`
- return type: `java.lang.Object`

Description: Retrieve a piece of data manually attached to this embedding via [#putData(String, Object)](#putData(String, Object)).
parameter: key: non\-null key
return: value or null

## Method: getDataMap
- return type: `java.util.Map<java.lang.String,java.lang.Object>`

Description: Get the stored data map.
return: read\-only data map

## Method: getFileTag
- return type: `java.lang.String`

Description: Get the optional file tag.
return: optional file tag, may be null

## Method: getMethodAddress
- return type: `java.lang.String`

Description: Get the method address or signature.
return: method address or signature

## Method: getTransientData
- parameter: `key`, type: `java.lang.String`
- return type: `java.lang.Object`

Description: Retrieve a piece of transient data manually attached to this object.
parameter: key: non\-null key
return: value or null

## Method: getTransientDataMap
- return type: `java.util.Map<java.lang.String,java.lang.Object>`

Description: Get the transient data map.
return: read\-only transient data map

## Method: getVector
- return type: `float[]`

Description: Get the embedding vector.
return: actual read\-write vector for this embedding

## Method: putData
- parameter: `key`, type: `java.lang.String`
- parameter: `value`, type: `java.lang.Object`
- return type: `java.lang.Object`

Description: Attach a non\-null piece of data to this embedding. The key\-value will be stored along with the vector in the embedding database\! The accepted value types are: Integer, Long, Float, String, byte\[\].
parameter: key: non\-null key
parameter: value: value to be attached, null to remove the entry
return: previous value or null if none existed

## Method: putTransientData
- parameter: `key`, type: `java.lang.String`
- parameter: `value`, type: `java.lang.Object`
- return type: `java.lang.Object`

Description: Attach a non\-null piece of transient data to this object. The key\-value will NOT be stored along with the vector in the embedding database\!
parameter: key: non\-null key
parameter: value: value to be attached, null to remove the entry
return: previous value or null if none existed

## Method: setCreationTimestamp
- parameter: `ms`, type: `long`

Description: Set the creation timestamp.
parameter: ms: timestamp in ms

## Method: setFileTag
- parameter: `tag`, type: `java.lang.String`

Description: Set the optional file tag.
parameter: tag: optional file tag

## Method: toString
- return type: `java.lang.String`


