KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > util > Messages


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.corext.util;
12
13 import com.ibm.icu.text.MessageFormat;
14
15 /**
16  * Helper class to format message strings.
17  *
18  * @since 3.1
19  */

20 public class Messages {
21
22     public static String JavaDoc format(String JavaDoc message, Object JavaDoc object) {
23         return MessageFormat.format(message, new Object JavaDoc[] { object});
24     }
25
26     public static String JavaDoc format(String JavaDoc message, Object JavaDoc[] objects) {
27         return MessageFormat.format(message, objects);
28     }
29
30     private Messages() {
31         // Not for instantiation
32
}
33 }
34
Popular Tags