~ubuntu-branches/ubuntu/wily/proguard/wily

« back to all changes in this revision

Viewing changes to src/proguard/classfile/attribute/LineNumberTableAttribute.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg
  • Date: 2014-04-10 13:58:11 UTC
  • mfrom: (1.2.5)
  • Revision ID: package-import@ubuntu.com-20140410135811-ddwzt2avu94rnolt
Tags: 4.11-1
* Team upload.
* New upstream release
* Removed the non-free documentation from the package (Closes: #719706)
* Removed the pre-built jars from the upstream tarball
* debian/control:
  - The package is now co-maintained with the Java Team
  - Standards-Version updated to 3.9.5 (no changes)
  - Added the Vcs-* fields
  - Added the Homepage field
* Switch to debhelper level 9
* Use XZ compression for the upstream tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * ProGuard -- shrinking, optimization, obfuscation, and preverification
3
3
 *             of Java bytecode.
4
4
 *
5
 
 * Copyright (c) 2002-2012 Eric Lafortune (eric@graphics.cornell.edu)
 
5
 * Copyright (c) 2002-2013 Eric Lafortune (eric@graphics.cornell.edu)
6
6
 *
7
7
 * This program is free software; you can redistribute it and/or modify it
8
8
 * under the terms of the GNU General Public License as published by the Free
77
77
    }
78
78
 
79
79
 
 
80
    /**
 
81
     * Returns the lowest line number, or 0 if there aren't any line numbers.
 
82
     */
 
83
    public int getLowestLineNumber()
 
84
    {
 
85
        if (u2lineNumberTableLength == 0)
 
86
        {
 
87
            return 0;
 
88
        }
 
89
 
 
90
        int lowestLineNumber = Integer.MAX_VALUE;
 
91
 
 
92
        for (int index = 0; index < u2lineNumberTableLength; index++)
 
93
        {
 
94
            int lineNumber = lineNumberTable[index].u2lineNumber;
 
95
            if (lineNumber < lowestLineNumber)
 
96
            {
 
97
                lowestLineNumber = lineNumber;
 
98
            }
 
99
        }
 
100
 
 
101
        return lowestLineNumber;
 
102
    }
 
103
 
 
104
 
 
105
    /**
 
106
     * Returns the highest line number, or 0 if there aren't any line numbers.
 
107
     */
 
108
    public int getHighestLineNumber()
 
109
    {
 
110
        if (u2lineNumberTableLength == 0)
 
111
        {
 
112
            return 0;
 
113
        }
 
114
 
 
115
        int highestLineNumber = Integer.MIN_VALUE;
 
116
 
 
117
        for (int index = 0; index < u2lineNumberTableLength; index++)
 
118
        {
 
119
            int lineNumber = lineNumberTable[index].u2lineNumber;
 
120
            if (lineNumber > highestLineNumber)
 
121
            {
 
122
                highestLineNumber = lineNumber;
 
123
            }
 
124
        }
 
125
 
 
126
        return highestLineNumber;
 
127
    }
 
128
 
 
129
 
80
130
    // Implementations for Attribute.
81
131
 
82
132
    public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor)