Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
XWork is an command-pattern framework that is used to power WebWork
as well as other applications. XWork provides an Inversion of Control
container, a powerful expression language, data type conversion,
validation, and pluggable configuration.
/*
* $Id: ActionConfigMatcher.java 1630 2007-10-05 15:10:08Z mrdon $
*
* Copyright 2003,2004 The Apache Software Foundation.
*
* Licensed 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 com.opensymphony.xwork2.config.impl;
import com.opensymphony.xwork2.util.PatternMatcher;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import java.io.Serializable;
import java.util.*;
/**
*
Matches patterns against pre-compiled wildcard expressions pulled from
* target objects. It uses the wildcard matcher from the Apache Cocoon
* project. Patterns will be matched in the order they were added. The first
* match wins, so more specific patterns should be defined before less specific
* patterns.
*
* @since 2.1
*/
public abstract class AbstractMatcher implements Serializable {
/**
*
The logging instance
*/
private static final Logger log = LoggerFactory.getLogger(AbstractMatcher.class);
/**
*
Handles all wildcard pattern matching.
*/
PatternMatcher
*/
private static class Mapping implements Serializable {
/**
*
The original pattern.
*/
private String original;
/**
*
The compiled pattern.
*/
private Object pattern;
/**
*
The original object.
*/
private E config;
/**
*
Contructs a read-only Mapping instance.
*
* @param original The original pattern
* @param pattern The compiled pattern
* @param config The original object
*/
public Mapping(String original, Object pattern, E config) {
this.original = original;
this.pattern = pattern;
this.config = config;
}
/**
*
Gets the compiled wildcard pattern.
*
* @return The compiled pattern
*/
public Object getPattern() {
return this.pattern;
}
/**
*
Gets the object that contains the pattern.
*
* @return The associated object
*/
public E getTarget() {
return this.config;
}
/**
*
Gets the original wildcard pattern.
*
* @return The original pattern
*/
public String getOriginalPattern() {
return this.original;
}
}
}