/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
*/ package org.apache.jasper.compiler;
/** * This class defines internal representation for an EL Expression * * It currently only defines functions. It can be expanded to define * all the components of an EL expression, if need to. * * @author Kin-man Chung
*/
/** * Represents a function * Currently only include the prefix and function name, but not its * arguments.
*/ publicstaticclassFunctionextends ELNode {
public String[] getParameters() { return parameters;
}
}
/** * An ordered list of ELNode.
*/ publicstaticclass Nodes {
/* Name used for creating a map for the functions in this EL expression, for communication to Generator.
*/ private String mapName = null; // The function map associated this EL privatefinal List<ELNode> list;
Nodes() {
list = new ArrayList<>();
}
publicvoid add(ELNode en) {
list.add(en);
}
/** * Visit the nodes in the list with the supplied visitor. * * @param v The visitor used * * @throws JasperException if an error occurs while visiting a node
*/ publicvoid visit(Visitor v) throws JasperException { for (ELNode n : list) {
n.accept(v);
}
}
public Iterator<ELNode> iterator() { return list.iterator();
}
/** * @return true if the expression contains a ${...}
*/ publicboolean containsEL() { for (ELNode n : list) { if (n instanceof Root) { returntrue;
}
} returnfalse;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.