/jboss-as-7.1.1.Final/host-controller/src/test/java/org/jboss/as/host/controller/JvmElementTestUtils.java
Java | 81 lines | 41 code | 14 blank | 26 comment | 0 complexity | 3389ad168c167b1164eed657d13bc7eb MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
1/*
2 * JBoss, Home of Professional Open Source.
3 * Copyright 2010, Red Hat, Inc., and individual contributors
4 * as indicated by the @author tags. See the copyright.txt file in the
5 * distribution for a full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */
22package org.jboss.as.host.controller;
23
24/**
25 *
26 * @author <a href="kabir.khan@jboss.com">Kabir Khan</a>
27 * @version $Revision: 1.1 $
28 */
29public class JvmElementTestUtils {
30
31 public static JvmElement create(JvmType type) {
32 JvmElement element = new JvmElement("test");
33 element.setJvmType(type);
34 return element;
35 }
36
37 public static void setDebugEnabled(JvmElement element, boolean value) {
38 element.setDebugEnabled(value);
39 }
40
41 public static void setDebugOptions(JvmElement element, String value) {
42 element.setDebugOptions(value);
43 }
44
45 public static void setHeapSize(JvmElement element, String value) {
46 element.setHeapSize(value);
47 }
48
49 public static void setMaxHeap(JvmElement element, String value) {
50 element.setMaxHeap(value);
51 }
52
53 public static void setPermgenSize(JvmElement element, String value) {
54 element.setPermgenSize(value);
55 }
56
57 public static void setMaxPermgen(JvmElement element, String value) {
58 element.setMaxPermgen(value);
59 }
60
61 public static void setStack(JvmElement element, String value) {
62 element.setStack(value);
63 }
64
65 public static void setAgentLib(JvmElement element, String value) {
66 element.setAgentLib(value);
67 }
68
69 public static void setAgentPath(JvmElement element, String value) {
70 element.setAgentPath(value);
71 }
72
73 public static void setJavaagent(JvmElement element, String value) {
74 element.setJavaagent(value);
75 }
76
77 public static void addJvmOption(JvmElement element, String value) {
78 element.getJvmOptions().addOption(value);
79 }
80
81}