sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/SourceFile.java
changeset 1 1050670c6980
child 6 f65f740e69f9
equal deleted inserted replaced
0:5ad7ad99af01 1:1050670c6980
       
     1 /*
       
     2  * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:  Definitions for the class SourceFile
       
    15  *
       
    16  */
       
    17 
       
    18 package com.nokia.s60tools.analyzetool.engine.statistic;
       
    19 
       
    20 /**
       
    21  * Constains information of found source file.
       
    22  * @author kihe
       
    23  *
       
    24  */
       
    25 public class SourceFile {
       
    26 
       
    27 	/** Source file name.*/
       
    28 	private String fileName;
       
    29 
       
    30 	/** Source file line number.*/
       
    31 	private int lineNumber;
       
    32 
       
    33 	/** How many times this source file is allocated.*/
       
    34 	private int howManyTimes = 1;
       
    35 
       
    36 	/** Source file function name. */
       
    37 	private String functionName;
       
    38 
       
    39 	/** Summary of allocations size.*/
       
    40 	private int size;
       
    41 
       
    42 	/** Allocation time.*/
       
    43 	private Long time;
       
    44 
       
    45 	/**
       
    46 	 * Returns source file name.
       
    47 	 * @return Source file name
       
    48 	 */
       
    49 	public String getFileName() {
       
    50 		return fileName;
       
    51 	}
       
    52 
       
    53 	/**
       
    54 	 * Sets source file name.
       
    55 	 * @param newFileName Source file name
       
    56 	 */
       
    57 	public void setFileName(String newFileName) {
       
    58 		this.fileName = newFileName;
       
    59 	}
       
    60 
       
    61 	/**
       
    62 	 * Returns source file line number.
       
    63 	 * @return Source file line number
       
    64 	 */
       
    65 	public int getLineNumber() {
       
    66 		return lineNumber;
       
    67 	}
       
    68 
       
    69 	/**
       
    70 	 * Sets source file line number
       
    71 	 * @param newLineNumber Line number
       
    72 	 */
       
    73 	public void setLineNumber(int newLineNumber) {
       
    74 		this.lineNumber = newLineNumber;
       
    75 	}
       
    76 
       
    77 	/**
       
    78 	 * Returns count of how many times this source file is allocated.
       
    79 	 * @return Count of allocations
       
    80 	 */
       
    81 	public int getHowManyTimes() {
       
    82 		return howManyTimes;
       
    83 	}
       
    84 
       
    85 	/**
       
    86 	 * Sets count of how many times this source file is allocated.
       
    87 	 * @param count Count of allocations
       
    88 	 */
       
    89 	public void setHowManyTimes(int count) {
       
    90 		this.howManyTimes = count;
       
    91 	}
       
    92 
       
    93 	/**
       
    94 	 * Updates count of allocations
       
    95 	 */
       
    96 	public void updateHowManyTimes()
       
    97 	{
       
    98 		this.howManyTimes +=1;
       
    99 	}
       
   100 
       
   101 	/**
       
   102 	 * Returns function name.
       
   103 	 * @return Function name
       
   104 	 */
       
   105 	public String getFunctionName() {
       
   106 		return functionName;
       
   107 	}
       
   108 
       
   109 	/**
       
   110 	 * Sets function name.
       
   111 	 * @param newFunctionName Function name
       
   112 	 */
       
   113 	public void setFunctionName(String newFunctionName) {
       
   114 		this.functionName = newFunctionName;
       
   115 	}
       
   116 
       
   117 	/**
       
   118 	 * Returns size of allocations.
       
   119 	 * @return Size of allocations
       
   120 	 */
       
   121 	public int getSize() {
       
   122 		return size;
       
   123 	}
       
   124 
       
   125 	/**
       
   126 	 * Updates allocation count memory usage size.
       
   127 	 * @param newSize Memory usage size
       
   128 	 */
       
   129 	public void updateSize(int newSize){
       
   130 		this.size += newSize;
       
   131 	}
       
   132 
       
   133 	/**
       
   134 	 * Returns time of allocation.
       
   135 	 * @return Time of allocation
       
   136 	 */
       
   137 	public Long getTime() {
       
   138 		return time;
       
   139 	}
       
   140 
       
   141 	/**
       
   142 	 * Sets time of allocation
       
   143 	 * @param newTime Time of allocation
       
   144 	 */
       
   145 	public void setTime(Long newTime) {
       
   146 		this.time = newTime;
       
   147 	}
       
   148 }