Java tutorial
//package com.java2s; /* * Copyright (c) 2012. betterFORM Project - http://www.betterform.de * Licensed under the terms of BSD License */ public class Main { /** * Start of an instance() function expression. */ public static final String INSTANCE_FUNCTION = "instance("; /** * Checks wether the specified path expression is an absolute path. * * @param path the path expression. * @return <code>true</code> if specified path expression is an absolute * path, otherwise <code>false</code>. */ public static boolean isAbsolutePath(String path) { return path != null && (path.startsWith("/") || path.startsWith(INSTANCE_FUNCTION)); } }