Package org.cruxframework.crux.core.rebind

Examples of org.cruxframework.crux.core.rebind.CruxGeneratorException


        {
          Class<?> dataClass = Class.forName(dataObject);
          DataObject annot = dataClass.getAnnotation(DataObject.class);
          if (dataObjects.containsKey(annot.value()))
          {
            throw new CruxGeneratorException("Duplicated DataObject found: ["+annot.value()+"].");
          }
         
          dataObjects.put(annot.value(), dataClass.getCanonicalName());
          dataObjectIdentifiers.put(annot.value(), extractIdentifiers(dataClass));
        }
View Full Code Here


    aType = parameterTypes[0];
    bType = parameterTypes[1];

    if (JClassUtils.isSimpleType(aType) || JClassUtils.isSimpleType(bType))
    {
      throw new CruxGeneratorException("Can not create a BeanCopier for simple types.");
    }
  }
View Full Code Here

            {
              srcWriter.println(toVariable+"."+toPropertyInfo.getWriteMethod().getName()+"("+fromVariable+"."+fromPropertyInfo.getReadMethod().getName()+"());");
            }
            else
            {
              throw new CruxGeneratorException("Can not create a BeanCopier. Incopatibles type for property ["+fromPropertyInfo.getName()+"].");
            }
          }
          else
          {
            JClassType fromPropClass = fromPropertyInfo.getType().isClassOrInterface();
View Full Code Here

          restMethods.add(methodInfo);
        }
      }
      catch (InvalidRestMethod e)
      {
        throw new CruxGeneratorException("Invalid Method: " + method.getEnclosingType().getName() + "." + method.getName() + "().", e);
      }
    }

    mustGenerateStateControlMethods = false;
    for (String methodURI : updateMethods)
    {
      if (!readMethods.contains(methodURI))
      {
        throw new CruxGeneratorException("Can not create the rest proxy. Can not found the " +
            "GET method for state dependent write method ["+methodURI+"].");
      }
      mustGenerateStateControlMethods = true;
    }
  }
View Full Code Here

      srcWriter.println(callbackParameterName+".onError(new RestError("+responseVariable+".getStatusCode(), (jsonObject.get(\"message\") != null && jsonObject.get(\"message\").isString() != null) ? jsonObject.get(\"message\").isString().stringValue() : \"\"));");
    }
    catch (Exception e)
    {
      throw new CruxGeneratorException("Error generatirng exception handlers for type ["+baseIntf.getParameterizedQualifiedSourceName()+"].", e);
    }
  }
View Full Code Here

 
  protected void validateProxyMethod(JMethod method)
  {
    if (method.getReturnType() != JPrimitiveType.VOID)
    {
      throw new CruxGeneratorException("Invalid signature for rest proxy method <"+method.getName()+">. Any method must be void");
    }
    JType[] parameterTypes = method.getParameterTypes();
    if (parameterTypes == null || parameterTypes.length < 1)
    {
      throw new CruxGeneratorException("Invalid signature for rest proxy method <"+method.getName()+">. Any method must have a last parameter of type Callback");
    }
    JClassType lastParameterType = parameterTypes[parameterTypes.length - 1].isClassOrInterface();
    if (lastParameterType == null || !callbackType.isAssignableFrom(lastParameterType))
    {
      throw new CruxGeneratorException("Invalid signature for rest proxy method <"+method.getName()+">. Any method must have a last parameter of type Callback");
    }
  }
View Full Code Here

            }
          }
        }
        catch (ScreenConfigException e)
        {
      throw new CruxGeneratorException("Error obtaining screen resource. Screen id: ["+relativeScreenId+"].", e);
        }
        return null;
    }
View Full Code Here

        }         
      }
    }
    catch (Exception e)
    {
      throw new CruxGeneratorException("Error obtaining screen resource. Screen id: ["+screenId+"].", e);
    }
  }
View Full Code Here

    JClassType[] parameterTypes = JClassUtils.getActualParameterTypes(baseIntf, beanComparatorType);
    aType = parameterTypes[0];

    if (JClassUtils.isSimpleType(aType))
    {
      throw new CruxGeneratorException("Can not create a BeanContentValidator for simple types.");
    }
  }
View Full Code Here

          context.direction = DockDirection.valueOf(directionProp);
        }
        catch (Exception e)
        {
          String childId = context.readChildProperty("id");
          throw new CruxGeneratorException("Error adding widget ["+childId+"] on parent Dockpanel ["+context.getWidgetId()+"]. Invalid direction.");
        }
      }
      else
      {
        context.direction = DockDirection.center;
View Full Code Here

TOP

Related Classes of org.cruxframework.crux.core.rebind.CruxGeneratorException

Copyright © 2018 www.massapicom. 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.