/** * @param type */ public CommandLineOption(String type, ArrayList values) { setOptionType(type); if (null != values) { this.optionValues = values; } }
/** * Converts a given Reader to an OMNode. * The reurned OMNode is fully built. * * @param reader * @return * @throws XMLStreamException */ public static OMNode toOM(Reader reader) throws XMLStreamException { return toOM(reader, true); }
/** * Pushes a new item onto the top of this stack. The pushed item is also returned. This is * equivalent to calling <code>add</code>. * * @param item the item to be added * @return the item just pushed */ public Object push(Object item) { add(item); return item; }
/** * This gets called when a fault message is received. * * @param msgContext the MessageContext containing the fault. */ public void onFault(MessageContext msgContext) { error = Utils.getInboundFaultFromMessageContext(msgContext); }
/** * @param word * @return Returns character removed string. */ protected String makeJavaClassName(String word) { if (JavaUtils.isJavaKeyword(word)) { return JavaUtils.makeNonJavaKeyword(word); } else { return JavaUtils.capitalizeFirstChar(JavaUtils.xmlNameToJava(word)); } }
/** * Tests the Object 'value': * if its null, return default. * if its a Boolean, return booleanValue() * if its an Integer, return 'false' if its '0' else 'true' * if its a String, return 'false' if its 'false', 'no', or '0' - else 'true' * All other types return 'true' */ public static boolean isTrue(Object value, boolean defaultVal) { return !isFalseExplicitly(value, !defaultVal); }
/** * Constructor - just pass in the <b>args</b> from the command line. */ public OptionsParser(String _args[]) throws MalformedURLException { if (_args == null) { _args = new String[]{}; } args = _args; usedArgs = null; getUser(); getPassword(); }
/** * Copies the input stream to the output stream * * @param stream the <code>InputStream</code> * @param ostream the <code>OutputStream</code> */ public static void copy(InputStream stream, OutputStream ostream) throws IOException { IOUtils.copy(stream, ostream, false); }
/** * Creates the output file * * @param packageName * @param fileName * @throws Exception */ private File createOutFile(String packageName, String fileName) throws Exception { return org.apache.axis2.util.FileWriter.createClassFile(this.rootDir, packageName, fileName, ".java"); }
public static ServiceContext fillContextInformation(AxisService axisService, ConfigurationContext configurationContext) throws AxisFault { // 2. if null, create new opCtxt // fill the service group context and service context info return fillServiceContextAndServiceGroupContext(axisService, configurationContext); }
/** * Return <code>true</code> if this stack is currently empty. * <p/> * This method exists for compatibility with <code>java.util.Stack</code>. New users of this * class should use <code>isEmpty</code> instead. * * @return true if the stack is currently empty */ public boolean empty() { return isEmpty(); }
/** * Returns true if the specified character is invalid. * * @param c The character to check. */ public static boolean isInvalid(int c) { return !isValid(c); } // isInvalid(int):boolean
/** * Converts a given inputstream to an OMNode * The reurned OMNode is fully built. * * @param inputStream * @return OMNode * @throws javax.xml.stream.XMLStreamException * */ public static OMNode toOM(InputStream inputStream) throws XMLStreamException { return toOM(inputStream, true); }
/** * Tests the Object 'value': * if its null, return default. * if its a Boolean, return booleanValue() * if its an Integer, return 'false' if its '0' else 'true' * if its a String, return 'false' if its 'false', 'no', or '0' - else 'true' * All other types return 'true' */ public static boolean isFalse(Object value, boolean defaultVal) { return isFalseExplicitly(value, defaultVal); }
/** * Convert DOM Element into a fully built OMElement * @param element dom Element * @return OMElement * @throws Exception */ public static OMElement toOM(Element element) throws Exception { return toOM(element, true); }
/** * Tests the String 'value': * return 'false' if its 'false', '0', or 'no' - else 'true' * <p/> * Follow in 'C' tradition of boolean values: * false is specific (0), everything else is true; */ public static boolean isTrue(String value) { return !isFalseExplicitly(value); }
/** * Converts a given Reader to an OMNode. * The reurned OMNode is fully built. * * @param reader * @return * @throws XMLStreamException */ public static OMNode toOM(Reader reader) throws XMLStreamException { return toOM(reader, true); }
/** * Tests the String 'value': * return 'true' if its 'false', '0', or 'no' - else 'false' * <p/> * Follow in 'C' tradition of boolean values: * false is specific (0), everything else is true; */ public static boolean isFalse(String value) { return isFalseExplicitly(value); }