-
Notifications
You must be signed in to change notification settings - Fork 3
/
SoftReferenceStatQuery.java
44 lines (40 loc) · 1.85 KB
/
SoftReferenceStatQuery.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*******************************************************************************
* Copyright (c) 2008, 2023 SAP AG and IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SAP AG - initial API and implementation
* Andrew Johnson/IBM Corporation - add icon
*******************************************************************************/
package org.eclipse.mat.inspections;
import org.eclipse.mat.internal.Messages;
import org.eclipse.mat.query.IQuery;
import org.eclipse.mat.query.IResult;
import org.eclipse.mat.query.annotations.Argument;
import org.eclipse.mat.query.annotations.CommandName;
import org.eclipse.mat.query.annotations.HelpUrl;
import org.eclipse.mat.query.annotations.Icon;
import org.eclipse.mat.snapshot.ISnapshot;
import org.eclipse.mat.snapshot.extension.Subject;
import org.eclipse.mat.util.IProgressListener;
@CommandName("soft_references_statistics")
@Icon("/META-INF/icons/soft_reference.gif")
@HelpUrl("/org.eclipse.mat.ui.help/reference/inspections/reference_stats.html")
@Subject("java.lang.ref.SoftReference")
public class SoftReferenceStatQuery implements IQuery
{
@Argument
public ISnapshot snapshot;
public IResult execute(IProgressListener listener) throws Exception
{
return ReferenceQuery.execute("java\\.lang\\.ref\\.SoftReference", snapshot, //$NON-NLS-1$
Messages.SoftReferenceStatQuery_Label_Referenced,
Messages.SoftReferenceStatQuery_Label_Retained,
Messages.SoftReferenceStatQuery_Label_StronglyRetainedReferents, listener);
}
}