Class EntityCodeBlock
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.engine.storage.EntityCodeBlock
-
- All Implemented Interfaces:
java.io.Serializable
,ICodeBlock
@Entity(name="CodeBlock") public class EntityCodeBlock extends java.lang.Object implements ICodeBlock, java.io.Serializable
ICodeBlock object for base storage implementation- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getBlockScore()
ISourceFile
getFile()
java.util.List<ITuple<java.lang.Integer,java.lang.Integer>>
getLineNumbers()
-
-
-
Method Detail
-
getBlockScore
public float getBlockScore()
- Specified by:
getBlockScore
in interfaceICodeBlock
- Returns:
- the score (0 to 1) of this block within the group
Example: 1 - all of this block matches the group
-
getFile
public ISourceFile getFile()
- Specified by:
getFile
in interfaceICodeBlock
- Returns:
- the file containing the block
-
getLineNumbers
public java.util.List<ITuple<java.lang.Integer,java.lang.Integer>> getLineNumbers()
- Specified by:
getLineNumbers
in interfaceICodeBlock
- Returns:
- a list of tuples of line numbers that define the start and end of the code block. In most cases the list should be a single item, but if the same block is copied in multiple places in a file, all instances of the block will be output here.
-
-