Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  // Copyright 2004, 2005 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
  // 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.tapestry.parse;
 import java.util.Map;
 import  org.apache.hivemind.Location;
 import  org.apache.hivemind.util.ToStringBuilder;

Token representing the open tag for a component. Components may be either specified or implicit. Specified components (the traditional type, dating back to the origin of Tapestry) are matched by an entry in the containing component's specification. Implicit components specify their type in the component template and must not have an entry in the containing component's specification.

Howard Lewis Ship
See also:
 public class OpenToken extends TemplateToken
     private String _tag;
     private String _id;
     private String _componentType;
     private Map _attributes;

Creates a new token with the given tag, id and type.

tag the template tag which represents the component, typically "span"
id the id for the component, which may be assigned by the template parser for implicit components
componentType the type of component, if an implicit component, or null for a specified component
location location of tag represented by this token
     public OpenToken(String tagString idString componentType, Location location)
          = tag;
          = id;
          = componentType;

Returns the id for the component.
     public String getId()
         return ;

Returns the tag used to represent the component within the template.
     public String getTag()
         return ;

Returns the specified component type, or null for a component where the type is not defined in the template. The type may include a library id prefix.
     public String getComponentType()
         return ;
     public void addAttribute(String nameString value)
         if ( == null)
              = new HashMap();

Returns a Map of attributes. Keys and values are strings.
    public Map getAttributesMap()
        return ;
    protected void extendDescription(ToStringBuilder builder)
New to GrepCode? Check out our FAQ X