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
  //
  //     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.tapestry.spec;
 
 import java.util.Map;

Defines a contained component. This includes the information needed to get the contained component's specification, as well as any bindings for the component.

Author(s):
Howard Lewis Ship
 
 
 public class ContainedComponent extends LocatablePropertyHolder implements IContainedComponent
 {
     private static final int MAP_SIZE = 3;
     
     protected Map _bindings;
     
     private String _type;
 
     private String _copyOf;
 
     private boolean _inheritInformalParameters;

    

Since:
4.0
 
     private String _propertyName;

    
Returns the named binding, or null if the binding does not exist.
 
 
     public IBindingSpecification getBinding(String name)
     {
         if ( == null)
             return null;
 
         return (IBindingSpecification.get(name);
     }

    
Returns an umodifiable Collection of Strings, each the name of one binding for the component.
 
 
     public Collection getBindingNames()
     {
         if ( == null)
             return .;
 
         return Collections.unmodifiableCollection(.keySet());
     }
 
     public String getType()
     {
         return ;
     }
 
     public void setBinding(String nameIBindingSpecification spec)
     {
         if ( == null)
              = new HashMap();
 
         .put(namespec);
     }
 
     public void setType(String value)
     {
          = value;
     }
    
    
Sets the String Id of the component being copied from. For use by IDE tools like Spindle.

Since:
1.0.9
 
 
     public void setCopyOf(String id)
     {
          = id;
     }

    
Returns the id of the component being copied from. For use by IDE tools like Spindle.

Since:
1.0.9
    public String getCopyOf()
    {
        return ;
    }

    
Returns whether the contained component will inherit the informal parameters of its parent.

Since:
3.0
    public boolean getInheritInformalParameters()
    {
        return ;
    }

    
Sets whether the contained component will inherit the informal parameters of its parent.

Since:
3.0
    public void setInheritInformalParameters(boolean value)
    {
         = value;
    }

    

Since:
4.0
    public String getPropertyName()
    {
        return ;
    }

    

Since:
4.0
    public void setPropertyName(String propertyName)
    {
         = propertyName;
    }
New to GrepCode? Check out our FAQ X