private JClassType getSplitLayoutPanelType(UiBinderWriter writer) { try { return writer.getOracle().getType(SplitLayoutPanel.class.getName()); } catch (NotFoundException e) { throw new RuntimeException("Unexpected exception", e); } }
private JClassType getType(TypeOracle oracle, Class cls) { try { return oracle.getType(cls.getName()); } catch (NotFoundException e) { throw new RuntimeException(e); } } }
private static JClassType requireType(TypeOracle typeOracle, Class<?> clazz) { try { return typeOracle.getType(clazz.getName()); } catch (NotFoundException e) { throw new RuntimeException(e); } }
private static JClassType requireType(TypeOracle typeOracle, Class<?> clazz) { try { return typeOracle.getType(clazz.getName()); } catch (NotFoundException e) { throw new RuntimeException(e); } }
public static JClassType getType(TypeOracle oracle, Class cls) { try { return oracle.getType(cls.getName()); } catch (NotFoundException e) { throw new RuntimeException(e); } } }
private JClassType getType(TypeOracle oracle, Class cls) { try { return oracle.getType(cls.getName()); } catch (NotFoundException e) { throw new RuntimeException(e); } } }
TypeXmlFinder(GeneratorContext context, TreeLogger logger){ super(context, logger); this.resourceOracle = context.getResourcesOracle(); JClassType[] _collectionOrMap = new JClassType[2]; try{ _collectionOrMap[0] = typeOracle.getType(Collection.class.getName()); _collectionOrMap[1] = typeOracle.getType(Map.class.getName()); }catch(NotFoundException e){ _collectionOrMap = null; } collectionOrMap = _collectionOrMap; }
RemoteServiceAsyncValidator(TreeLogger logger, TypeOracle typeOracle) throws UnableToCompleteException { try { asyncCallbackClass = typeOracle.getType(AsyncCallback.class.getName()); requestType = typeOracle.getType(Request.class.getCanonicalName()); requestBuilderType = typeOracle.getType(RequestBuilder.class.getCanonicalName()); } catch (NotFoundException e) { logger.log(TreeLogger.ERROR, null, e); throw new UnableToCompleteException(); } }
RemoteServiceAsyncValidator(TreeLogger logger, TypeOracle typeOracle) throws UnableToCompleteException { try { asyncCallbackClass = typeOracle.getType(AsyncCallback.class.getName()); requestType = typeOracle.getType(Request.class.getCanonicalName()); requestBuilderType = typeOracle.getType(RequestBuilder.class.getCanonicalName()); } catch (NotFoundException e) { logger.log(TreeLogger.ERROR, null, e); throw new UnableToCompleteException(); } }
public static MetaClass newInstance(final TypeOracle oracle, final String type) { try { return newUncachedInstance(oracle, oracle.getType(type)); } catch (final NotFoundException e) { return null; } }
public static MetaClass newInstance(final TypeOracle oracle, final String type) { try { return newUncachedInstance(oracle, oracle.getType(type)); } catch (final NotFoundException e) { return null; } }
private JClassType getSplitLayoutPanelType(UiBinderWriter writer) { try { return writer.getOracle().getType(SplitLayoutPanel.class.getName()); } catch (NotFoundException e) { throw new RuntimeException("Unexpected exception", e); } }
private JClassType getSplitLayoutPanelType(UiBinderWriter writer) { try { return writer.getOracle().getType(SplitLayoutPanel.class.getName()); } catch (NotFoundException e) { throw new RuntimeException("Unexpected exception", e); } }
protected JClassType interfaceType(TypeOracle oracle, String s) throws UnableToCompleteException { JClassType interfaceType; try { interfaceType = oracle.getType(s); } catch (NotFoundException e) { treeLogger.log(TreeLogger.ERROR, String.format("%s: Could not find the interface [%s]. %s", e.getClass().getName(), s, e.getMessage())); throw new UnableToCompleteException(); } return interfaceType; }
private void tryGenerateDelegate() throws NotFoundException, UnableToCompleteException { JClassType resourceDelegateType = typeOracle.getType(ResourceDelegate.class.getName()); JClassType type = typeOracle.getType(typeName); JClassType[] implementedInterfaces = type.getImplementedInterfaces(); for (JClassType implementedInterface : implementedInterfaces) { if (implementedInterface.isAssignableTo(resourceDelegateType)) { doGenerate(type, implementedInterface); return; } } throw new UnableToCompleteException(); }
private JClassType getClassType(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException { try { // get the type we are looking for return context.getTypeOracle().getType(typeName); } catch (NotFoundException e) { // if we can`t get it die logger.log(TreeLogger.ERROR, "can not find type: '" + typeName + "'", e); throw new UnableToCompleteException(); } }
private JClassType getClassType(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException { try { // get the type we are looking for return context.getTypeOracle().getType(typeName); } catch (NotFoundException e) { // if we can`t get it die logger.log(TreeLogger.ERROR, "can not find type: '" + typeName + "'", e); throw new UnableToCompleteException(); } }
private boolean isComponentElement(UiBinderWriter writer, XMLElement widget) throws UnableToCompleteException { JClassType fieldType = writer.findFieldType(widget); JClassType componentType; try { componentType = writer.getOracle().getType(GxtClassnameConstants.COMPONENT); } catch (NotFoundException e) { throw new UnableToCompleteException(); } return componentType.isAssignableFrom(fieldType); }
private boolean isMenuElement(UiBinderWriter writer, XMLElement menu) throws UnableToCompleteException { JClassType fieldType = writer.findFieldType(menu); JClassType menuType; try { menuType = writer.getOracle().getType(GxtClassnameConstants.MENU); } catch (NotFoundException e) { throw new UnableToCompleteException(); } return menuType.isAssignableFrom(fieldType); } }
@Override public RebindResult generateIncrementally(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException { TypeOracle oracle = context.getTypeOracle(); logger.log(Type.TRACE, "Generating magic class for " + typeName); try { return execImpl(logger, context, oracle.getType(SourceUtil.toSourceName(typeName))); } catch (NotFoundException e) { logger.log(Type.ERROR, "Could not find class for " + typeName, e); } throw new UnableToCompleteException(); }