001    /*******************************************************************************
002     * Copyright (C) 2009-2011 FuseSource Corp.
003     *
004     * All rights reserved. This program and the accompanying materials
005     * are made available under the terms of the Eclipse Public License v1.0
006     * which accompanies this distribution, and is available at
007     * http://www.eclipse.org/legal/epl-v10.html
008     *
009     *******************************************************************************/
010    package org.fusesource.hawtjni.generator.util;
011    
012    /**
013     * 
014     * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
015     */
016    public class TextSupport {
017        
018        static public String cast(String cast) {
019            cast = cast.trim();
020            if (cast.length() > 0) {
021                if (!cast.startsWith("(") || !cast.endsWith(")"))
022                    cast = "(" + cast + ")";
023            }
024            return cast;
025        }
026        
027    }