org.hyperic.sigar.shell.ProcessQueryCompleter Maven / Gradle / Ivy
/*
* Copyright (c) 2007 Hyperic, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hyperic.sigar.shell;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.hyperic.sigar.SigarProxy;
import org.hyperic.sigar.util.GetlineCompleter;
public class ProcessQueryCompleter implements GetlineCompleter {
private static final String SIGAR_PACKAGE =
"org.hyperic.sigar.";
private static final Map METHODS = new HashMap();
private static final Collection NOPS =
Arrays.asList(new String[] {
"eq", "ne", "gt", "ge", "lt", "le"
});
private static final Collection SOPS =
Arrays.asList(new String[] {
"eq", "ne", "re", "ct", "ew", "sw"
});
private static final Class[] NOPARAM = new Class[0];
private static final String PROC_PREFIX = "getProc";
private ShellBase shell;
private GetlineCompleter m_completer;
private Map methods;
static {
Method[] methods = SigarProxy.class.getMethods();
for (int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy