Path: blob/master/test/hotspot/jtreg/serviceability/tmtools/jstack/utils/MethodInfo.java
41159 views
/*1* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/22package utils;2324import java.util.LinkedList;2526/**27*28* Represents method info string29*30*/31public class MethodInfo {3233private String name;34private String compilationUnit;35private String args;36private String bci;37private String line;38private String frameType;3940private LinkedList<MonitorInfo> locks = new LinkedList<MonitorInfo>();4142public String getName() {43return name;44}4546public void setName(String name) {47this.name = name;48}4950public String getCompilationUnit() {51return compilationUnit;52}5354public void setCompilationUnit(String compilationUnit) {55this.compilationUnit = compilationUnit;56}5758public String getArgs() {59return args;60}6162public void setArgs(String args) {63this.args = args;64}6566public String getBci() {67return bci;68}6970public void setBci(String bci) {71this.bci = bci;72}7374public String getLine() {75return line;76}7778public void setLine(String line) {79this.line = line;80}8182public String getFrameType() {83return frameType;84}8586public void setFrameType(String frameType) {87this.frameType = frameType;88}8990public LinkedList<MonitorInfo> getLocks() {91return locks;92}9394public void setLocks(LinkedList<MonitorInfo> locks) {95this.locks = locks;96}9798public boolean equals(MethodInfo another) {99100boolean result = true;101102if (!Utils.compareStrings(name, another.name)) {103Utils.log("name", name, another.name);104result = false;105}106107if (!Utils.compareStrings(compilationUnit, another.compilationUnit)) {108Utils.log("compilationUnit", compilationUnit, another.compilationUnit);109result = false;110}111112/*113if (!Utils.compareStrings(args, another.args)) {114Utils.log("args", args, another.args);115result = false;116}117118if (!Utils.compareStrings(bci, another.bci)) {119Utils.log("bci", bci, another.bci);120result = false;121}122123if (!Utils.compareStrings(frameType, another.frameType)) {124Utils.log("frameType", frameType, another.frameType);125result = false;126}127*/128if (!Utils.compareStrings(line, another.line)) {129Utils.log("line", line, another.line);130result = false;131}132133return result;134}135136}137138139