Examples of ITypeDescriptor


Examples of org.eclipse.jst.jsf.context.symbol.ITypeDescriptor

     * @param propertyId
     * @return the symbol for the named propertyId or null if not found
     */
    public ISymbol getProperty(ISymbol base, Object propertyId)
    {
        ITypeDescriptor typeDesc = null;

        Object[] factoredProperties = new Object[] {propertyId};

        // check for expected interface types per JSP.2.3.4
        if (base instanceof IObjectSymbol)
View Full Code Here

Examples of org.eclipse.jst.jsf.context.symbol.ITypeDescriptor

        // if nothing found, return an empty array
        List  symbolsList =  Collections.EMPTY_LIST;
       
        if (base instanceof IObjectSymbol)
        {
            ITypeDescriptor typeDesc = null;
           
            // per JSP.2.3.4, if instance of map (unconstrained in our terminology)
            if (((IObjectSymbol)base).supportsCoercion(TypeConstants.TYPE_MAP))
            {
                typeDesc =
                    ((IObjectSymbol)base).coerce(TypeConstants.TYPE_MAP);
            }
            // Lists have no properties, even if they are also beans
            else if (((IObjectSymbol)base).supportsCoercion(TypeConstants.TYPE_LIST))
            {
                typeDesc = null;
            }
            else
            {
                typeDesc = ((IObjectSymbol)base).getTypeDescriptor();
           
            }
           
            if (typeDesc != null)
            {
                symbolsList =  typeDesc.getProperties();
                addCCAttrsIfNecessary(typeDesc, symbolsList);
            }
        }

        return (ISymbol[]) symbolsList.toArray(ISymbol.EMPTY_SYMBOL_ARRAY);
View Full Code Here

Examples of org.eclipse.jst.jsf.context.symbol.ITypeDescriptor

  /* (non-Javadoc)
     * @see org.eclipse.jst.jsf.designtime.el.AbstractDTPropertyResolver#getProperty(org.eclipse.jst.jsf.context.symbol.ISymbol, int)
     */
    public ISymbol getProperty(ISymbol base, int offset)
    {
        ITypeDescriptor typeDesc = null;

        if (offset < 0)
        {
          // should never be called with offset < 0
          throw new AssertionError("offsets must be >=0 to be valid"); //$NON-NLS-1$
        }
       
        // check for expected interface types per JSP.2.3.4
        if (base instanceof IObjectSymbol)
        {

          final IObjectSymbol objSymbol = (IObjectSymbol) base;
            typeDesc = objSymbol.getTypeDescriptor();

            // per JSP.2.3.4, if instance of array (unconstrained in our terminology)
            if (typeDesc.isArray())
            {
                ISymbol arrayElement = typeDesc.getArrayElement();
                // reset the name
                arrayElement.setName(base.getName()+"["+offset+"]"); //$NON-NLS-1$ //$NON-NLS-2$
                return arrayElement;
            }
           
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.ITypeDescriptor

   * @param atype
   * @return the meta-data type descriptor
   */
  protected ITypeDescriptor createType(IType atype){
    if (atype != null){
      ITypeDescriptor desc = createDescriptorInstance(atype);
      if (desc != null){
        desc.setTypeExtension(atype);
        return desc;
      }
    }
    return null;
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.metadataprocessors.ITypeDescriptor

   * @return IMetaDataEnabledFeature.  <br>Will return null if the type that the feature extension is bound to,
   * is not a subclass of the supplied type
   */
  public IMetaDataEnabledFeature getFeatureAdapterForSubclass(IMetaDataEnabledFeatureExtension feature, Class processingFeature, IType type){
    if (feature != null ){
      ITypeDescriptor aType = AttributeValueRuntimeTypeFactory.getInstance().getType(feature.getTypeID());
      Class klass = aType.getTypeExtension().getClass();
      if (klass.asSubclass(type.getClass()) != null)
        return createFeature(feature, processingFeature);     
    }
    return null;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.