/* | |
* 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.myfaces.buildtools.maven2.plugin.builder.qdox; | |
/** | |
* Representation of a Tag's attribute in a Facelet File | |
* | |
* @author Jacob Hookom | |
* @version $Id: TagAttribute.java,v 1.9 2008/07/13 19:01:35 rlubke Exp $ | |
*/ | |
public final class _TagAttribute | |
{ | |
private final String localName; | |
private final _Location location; | |
private final String namespace; | |
private final String qName; | |
private final String value; | |
private String string; | |
public _TagAttribute(_Location location, String ns, String localName, String qName, String value) | |
{ | |
this.location = location; | |
this.namespace = ns; | |
this.localName = localName; | |
this.qName = qName; | |
this.value = value; | |
} | |
/** | |
* Local name of this attribute | |
* | |
* @return local name of this attribute | |
*/ | |
public String getLocalName() | |
{ | |
return this.localName; | |
} | |
/** | |
* The location of this attribute in the FaceletContext | |
* | |
* @return the TagAttribute's location | |
*/ | |
public _Location getLocation() | |
{ | |
return this.location; | |
} | |
/** | |
* The resolved Namespace for this attribute | |
* | |
* @return resolved Namespace | |
*/ | |
public String getNamespace() | |
{ | |
return this.namespace; | |
} | |
/** | |
* The qualified name for this attribute | |
* | |
* @return the qualified name for this attribute | |
*/ | |
public String getQName() | |
{ | |
return this.qName; | |
} | |
/** | |
* Return the literal value of this attribute | |
* | |
* @return literal value | |
*/ | |
public String getValue() | |
{ | |
return this.value; | |
} | |
/* | |
* (non-Javadoc) | |
* | |
* @see java.lang.Object#toString() | |
*/ | |
public String toString() | |
{ | |
if (this.string == null) | |
{ | |
this.string = this.location + " " + this.qName + "=\"" + this.value + "\""; | |
} | |
return this.string; | |
} | |
} |