bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
private static Vector getListOfFiles(File file, boolean recursive) { Vector ret = new Vector(); if (file.isFile()) { ret.add(file.getAbsolutePath()); } else if (file.isDirectory()) { File[] files = file.listFiles(new FileFilter() { public boolean accept(File pathname) { return pathname.getAbsolutePath().endsWith(".java"); } }); for (int i = 0; i < files.length; i++) { if (recursive) { ret.addAll(getListOfFiles(files[i], true)); } else { if (files[i].isFile()) { ret.add(files[i].getAbsolutePath()); } } } } return ret; }
|
private static Vector getListOfFiles(File file, boolean recursive) { Vector ret = new Vector(); if (file.isFile()) { ret.add(file.getAbsolutePath()); } else if (file.isDirectory()) { File[] files = file.listFiles(new FileFilter() { public boolean accept(File pathname) { return pathname.getAbsolutePath().endsWith(".java"); } }); for (int i = 0; i < files.length; i++) { if (recursive) { ret.addAll(getListOfFiles(files[i], true)); } else { if (files[i].isFile()) { ret.add(files[i].getAbsolutePath()); } } } } return ret; }
| 3,227,995
|
public boolean accept(File pathname) { return pathname.getAbsolutePath().endsWith(".java"); }
|
public boolean accept(File pathname) { return pathname.getAbsolutePath().endsWith(".java"); }
| 3,227,996
|
protected void clearHighlights() { if (lastEntered != null) { lastEntered.setParamsHighlighted(false); ChainModuleData mod = lastEntered.getModule(); if (mod != null) mod.setModulesHighlighted(false); } }
|
protected void clearHighlights() { if (lastEntered != null) { lastEntered.setParamsHighlighted(false); ChainModuleData mod = lastEntered.getModule(); if (mod != null) mod.setModulesHighlighted(false); } }
| 3,227,997
|
public boolean waitForUnsatisfiedConditions(ServiceName serviceName, Set conditions) throws UnsatisfiedConditionsException { throw new UnsatisfiedConditionsException("Unsatisfied start conditions", serviceName, conditions); }
|
public boolean waitForUnsatisfiedConditions(ServiceName serviceName, Set conditions) throws UnsatisfiedConditionsException { throw new UnsatisfiedConditionsException("Unsatisfied stop conditions", serviceName, conditions); }
| 3,227,998
|
public ForcedStopException(ServiceName serviceName, Set unsatisfiedConditions) { super("Forced stop and ignored unsatisfied conditons:" + " serviceName=" + serviceName + ", unsatisfiedConditions=" + unsatisfiedConditions); this.serviceName = serviceName; this.unsatisfiedConditions = unsatisfiedConditions; }
|
public ForcedStopException(ServiceName serviceName, Set unsatisfiedConditions) { super("Forced stop and ignored unsatisfied conditons:" + " serviceName=" + serviceName + ", unsatisfiedConditions=" + unsatisfiedConditions); this.serviceName = serviceName; this.unsatisfiedConditions = Collections.unmodifiableSet(unsatisfiedConditions); }
| 3,227,999
|
public UnsatisfiedConditionsException(String message, ServiceName serviceName, Set unsatisfiedConditions) { super(message + ": serviceName=" + serviceName + ": unsatisfiedConditions=" + unsatisfiedConditions); this.serviceName = serviceName; this.unsatisfiedConditions = unsatisfiedConditions; }
|
public UnsatisfiedConditionsException(String message, ServiceName serviceName, Set unsatisfiedConditions) { super(message + ": serviceName=" + serviceName + ": unsatisfiedConditions=" + unsatisfiedConditions); this.serviceName = serviceName; this.unsatisfiedConditions = Collections.unmodifiableSet(unsatisfiedConditions); }
| 3,228,000
|
public Main(String[] args) throws IOException { Copyright.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[1] = new LongOpt("line", LongOpt.REQUIRED_ARGUMENT, null, 'l'); longOpts[2] = new LongOpt("directory", LongOpt.REQUIRED_ARGUMENT, null, 'd'); longOpts[3] = new LongOpt("regex", LongOpt.REQUIRED_ARGUMENT, null, 'r'); Getopt g = new Getopt(getClass().getName(), args, ":b:l:d:r:", longOpts); int c; double branchCoverageRate = 0.8; double lineCoverageRate = 0.7; while ((c = g.getopt()) != -1) { switch (c) { case 'b': branchCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg()); break; case 'l': lineCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg()); break; case 'd': setInstrumentationDirectory(new File(g.getOptarg())); break; case 'r': setMinimumCoverageRate(g.getOptarg()); break; } } minimumCoverageRate = new CoverageRate(lineCoverageRate, branchCoverageRate); if (logger.isInfoEnabled()) { logger.info("instrumentation directory: " + instrumentationDirectory); } merge(loadInstrumentation(new FileInputStream(new File( instrumentationDirectory, InstrumentationPersistence.FILE_NAME)))); if (logger.isInfoEnabled()) { logger .info("instrumentation has " + keySet().size() + " entries"); } Iterator i = keySet().iterator(); while (i.hasNext()) { String key = (String)i.next(); CoverageRate coverageRate = findMinimumCoverageRate(key); CoverageData instrumentation = getInstrumentation(key); if (logger.isInfoEnabled()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(", line: "); sb.append(percentage(instrumentation.getLineCoverageRate())); sb.append("% ("); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%), branch: "); sb .append(percentage(instrumentation .getBranchCoverageRate())); sb.append("% ("); sb.append(percentage(coverageRate.getBranchCoverageRate())); sb.append("%)"); logger.info(sb.toString()); } if (instrumentation.getLineCoverageRate() < coverageRate .getLineCoverageRate()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(" line coverage rate of: "); sb.append(percentage(instrumentation.getLineCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } if (instrumentation.getBranchCoverageRate() < coverageRate .getBranchCoverageRate()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(" branch coverage rate of: "); sb .append(percentage(instrumentation .getBranchCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getBranchCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } } }
|
public Main(String[] args) throws IOException { Copyright.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[1] = new LongOpt("line", LongOpt.REQUIRED_ARGUMENT, null, 'l'); longOpts[2] = new LongOpt("directory", LongOpt.REQUIRED_ARGUMENT, null, 'd'); longOpts[3] = new LongOpt("regex", LongOpt.REQUIRED_ARGUMENT, null, 'r'); Getopt g = new Getopt(getClass().getName(), args, ":b:l:d:r:", longOpts); int c; double branchCoverageRate = 0.8; double lineCoverageRate = 0.7; while ((c = g.getopt()) != -1) { switch (c) { case 'b': branchCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg()); break; case 'l': lineCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg()); break; case 'd': setInstrumentationDirectory(new File(g.getOptarg())); break; case 'r': setMinimumCoverageRate(g.getOptarg()); break; } } minimumCoverageRate = new CoverageRate(lineCoverageRate, branchCoverageRate); if (logger.isInfoEnabled()) { logger.info("instrumentation directory: " + instrumentationDirectory); } merge(loadInstrumentation(new FileInputStream(new File( instrumentationDirectory, InstrumentationPersistence.FILE_NAME)))); if (logger.isInfoEnabled()) { logger .info("instrumentation has " + keySet().size() + " entries"); } Iterator i = keySet().iterator(); while (i.hasNext()) { String key = (String)i.next(); CoverageRate coverageRate = findMinimumCoverageRate(key); CoverageData instrumentation = getInstrumentation(key); if (logger.isInfoEnabled()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(", line: "); sb.append(percentage(instrumentation.getLineCoverageRate())); sb.append("% ("); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%), branch: "); sb .append(percentage(instrumentation .getBranchCoverageRate())); sb.append("% ("); sb.append(percentage(coverageRate.getBranchCoverageRate())); sb.append("%)"); logger.info(sb.toString()); } if (instrumentation.getLineCoverageRate() < coverageRate .getLineCoverageRate()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(" line coverage rate of: "); sb.append(percentage(instrumentation.getLineCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } if (instrumentation.getBranchCoverageRate() < coverageRate .getBranchCoverageRate()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(" branch coverage rate of: "); sb .append(percentage(instrumentation .getBranchCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getBranchCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } } }
| 3,228,002
|
public boolean isLensVisible() { return view.isLensVisible(); }
|
public boolean isLensVisible() { if (model.getState() == DISCARDED) throw new IllegalStateException("The method cannot be invoked in " + "the DISCARDED state."); return view.isLensVisible(); }
| 3,228,005
|
void setLensVisible(boolean b) { if (lens == null) lens = new LensComponent(this); if (b) { if (model.getMaxX() < lens.getLensUI().getWidth() || model.getMaxY() < lens.getLensUI().getHeight()) return; if (firstTimeLensShown) { firstTimeLensShown = false; int lensX = model.getMaxX()/2-lens.getLensUI().getWidth()/2; int lensY = model.getMaxY()/2-lens.getLensUI().getHeight()/2; if (lensX+lens.getLensUI().getWidth() > model.getMaxX()) lensX = model.getMaxX()-lens.getLensUI().getWidth(); if (lensY+lens.getLensUI().getHeight() > model.getMaxY()) lensY = model.getMaxY()-lens.getLensUI().getHeight(); lens.setImageZoomFactor((float) model.getZoomFactor()); lens.setLensLocation(lensX, lensY); lens.setXYPixelMicron(model.getPixelsSizeX(), model.getPixelsSizeY()); model.getBrowser().addComponent(lens.getLensUI()); lens.setZoomWindowLocation(getX()+getWidth(), getY()); } lens.setImageZoomFactor((float) model.getZoomFactor()); lens.setPlaneImage(model.getDisplayedImage()); lens.setLensPreferredColour(); } lens.setVisible(b); repaint(); }
|
void setLensVisible(boolean b) { if (lens == null) lens = new LensComponent(this); if (b) { if (model.getMaxX() < lens.getLensUI().getWidth() || model.getMaxY() < lens.getLensUI().getHeight()) return; if (firstTimeLensShown) { firstTimeLensShown = false; int lensX = model.getMaxX()/2-lens.getLensUI().getWidth()/2; int lensY = model.getMaxY()/2-lens.getLensUI().getHeight()/2; if (lensX+lens.getLensUI().getWidth() > model.getMaxX()) lensX = model.getMaxX()-lens.getLensUI().getWidth(); if (lensY+lens.getLensUI().getHeight() > model.getMaxY()) lensY = model.getMaxY()-lens.getLensUI().getHeight(); lens.setImageZoomFactor((float) model.getZoomFactor()); lens.setLensLocation(lensX, lensY); lens.setXYPixelMicron(model.getPixelsSizeX(), model.getPixelsSizeY()); model.getBrowser().addComponent(lens.getLensUI()); lens.setZoomWindowLocation(getX()+getWidth(), getY()); } lens.setImageZoomFactor((float) model.getZoomFactor()); lens.setPlaneImage(model.getOriginalImage()); lens.setLensPreferredColour(); } lens.setVisible(b); repaint(); }
| 3,228,007
|
public SpringServiceFactory(RootBeanDefinition beanDefinition, Map objectNameMap) throws Exception { this.beanDefinition = beanDefinition; this.objectNameMap = objectNameMap; extractDependencies(beanDefinition); }
|
public SpringServiceFactory(RootBeanDefinition beanDefinition, Map objectNameMap) throws Exception { this.beanDefinition = beanDefinition; this.objectNameMap = objectNameMap; dependencies = SpringUtil.extractDependencies(beanDefinition, objectNameMap); }
| 3,228,008
|
public Object createService(final ServiceContext serviceContext) throws Exception { Object service = null; try { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); ServiceContext oldServiceContext = ServiceContextThreadLocal.get(); try { Thread.currentThread().setContextClassLoader(serviceContext.getClassLoader()); ServiceContextThreadLocal.set(serviceContext); ApplicationContext parent = new ApplicationContext() { public ApplicationContext getParent() { throw new UnsupportedOperationException(); } public String getDisplayName() { throw new UnsupportedOperationException(); } public long getStartupDate() { throw new UnsupportedOperationException(); } public void publishEvent(ApplicationEvent event) {// throw new UnsupportedOperationException(); } public boolean containsBeanDefinition(String beanName) { throw new UnsupportedOperationException(); } public int getBeanDefinitionCount() { throw new UnsupportedOperationException(); } public String[] getBeanDefinitionNames() { throw new UnsupportedOperationException(); } public String[] getBeanDefinitionNames(Class type) { throw new UnsupportedOperationException(); } public String[] getBeanNamesForType(Class type) { throw new UnsupportedOperationException(); } public String[] getBeanNamesForType(Class type, boolean includePrototypes, boolean includeFactoryBeans) { throw new UnsupportedOperationException(); } public Map getBeansOfType(Class type) throws BeansException { throw new UnsupportedOperationException(); } public Map getBeansOfType(Class type, boolean includePrototypes, boolean includeFactoryBeans) throws BeansException { throw new UnsupportedOperationException(); } public Object getBean(String name) throws BeansException { throw new UnsupportedOperationException(); } public Object getBean(String name, Class requiredType) throws BeansException { ObjectName objectName = null; try { objectName = getObjectName(name); } catch (MalformedObjectNameException e) { throw (NoSuchBeanDefinitionException) new NoSuchBeanDefinitionException(name, "Could not create an objectname for the specified name").initCause(e); } try { Object service = serviceContext.getKernel().getService(objectName); return service; } catch (Exception e) { throw (NoSuchBeanDefinitionException) new NoSuchBeanDefinitionException(name, "Kernel threw an exception").initCause(e); } } public boolean containsBean(String name) { throw new UnsupportedOperationException(); } public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public Class getType(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public String[] getAliases(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public BeanFactory getParentBeanFactory() { throw new UnsupportedOperationException(); } public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) { throw new UnsupportedOperationException(); } public String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException { throw new UnsupportedOperationException(); } public String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException { throw new UnsupportedOperationException(); } public Resource[] getResources(String locationPattern) { throw new UnsupportedOperationException(); } public Resource getResource(String location) { throw new UnsupportedOperationException(); } }; applicationContext = new GenericApplicationContext(parent); applicationContext.registerBeanDefinition(serviceContext.getObjectName(), beanDefinition); applicationContext.refresh(); service = applicationContext.getBean(serviceContext.getObjectName()); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); ServiceContextThreadLocal.set(oldServiceContext); } } catch (Throwable t) { applicationContext = null; if (t instanceof Exception) { throw (Exception) t; } else if (t instanceof Error) { throw (Error) t; } else { throw new Error(t); } } return service; }
|
public Object createService(final ServiceContext serviceContext) throws Exception { Object service = null; try { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); ServiceContext oldServiceContext = ServiceContextThreadLocal.get(); try { Thread.currentThread().setContextClassLoader(serviceContext.getClassLoader()); ServiceContextThreadLocal.set(serviceContext); ApplicationContext parent = new ApplicationContext() { public ApplicationContext getParent() { throw new UnsupportedOperationException(); } public String getDisplayName() { throw new UnsupportedOperationException(); } public long getStartupDate() { throw new UnsupportedOperationException(); } public void publishEvent(ApplicationEvent event) {// throw new UnsupportedOperationException(); } public boolean containsBeanDefinition(String beanName) { throw new UnsupportedOperationException(); } public int getBeanDefinitionCount() { throw new UnsupportedOperationException(); } public String[] getBeanDefinitionNames() { throw new UnsupportedOperationException(); } public String[] getBeanDefinitionNames(Class type) { throw new UnsupportedOperationException(); } public String[] getBeanNamesForType(Class type) { throw new UnsupportedOperationException(); } public String[] getBeanNamesForType(Class type, boolean includePrototypes, boolean includeFactoryBeans) { throw new UnsupportedOperationException(); } public Map getBeansOfType(Class type) throws BeansException { throw new UnsupportedOperationException(); } public Map getBeansOfType(Class type, boolean includePrototypes, boolean includeFactoryBeans) throws BeansException { throw new UnsupportedOperationException(); } public Object getBean(String name) throws BeansException { throw new UnsupportedOperationException(); } public Object getBean(String name, Class requiredType) throws BeansException { ObjectName objectName = null; try { objectName = SpringUtil.getObjectName(objectNameMap, name); } catch (MalformedObjectNameException e) { throw (NoSuchBeanDefinitionException) new NoSuchBeanDefinitionException(name, "Could not create an objectname for the specified name").initCause(e); } try { Object service = serviceContext.getKernel().getService(objectName); return service; } catch (Exception e) { throw (NoSuchBeanDefinitionException) new NoSuchBeanDefinitionException(name, "Kernel threw an exception").initCause(e); } } public boolean containsBean(String name) { throw new UnsupportedOperationException(); } public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public Class getType(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public String[] getAliases(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public BeanFactory getParentBeanFactory() { throw new UnsupportedOperationException(); } public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) { throw new UnsupportedOperationException(); } public String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException { throw new UnsupportedOperationException(); } public String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException { throw new UnsupportedOperationException(); } public Resource[] getResources(String locationPattern) { throw new UnsupportedOperationException(); } public Resource getResource(String location) { throw new UnsupportedOperationException(); } }; applicationContext = new GenericApplicationContext(parent); applicationContext.registerBeanDefinition(serviceContext.getObjectName(), beanDefinition); applicationContext.refresh(); service = applicationContext.getBean(serviceContext.getObjectName()); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); ServiceContextThreadLocal.set(oldServiceContext); } } catch (Throwable t) { applicationContext = null; if (t instanceof Exception) { throw (Exception) t; } else if (t instanceof Error) { throw (Error) t; } else { throw new Error(t); } } return service; }
| 3,228,009
|
void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException;
|
void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException;
| 3,228,010
|
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { visitConstructorArgumentValues(beanDefinition.getConstructorArgumentValues()); visitMutablePropertyValues(beanDefinition.getPropertyValues()); }
|
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { visitConstructorArgumentValues(beanDefinition.getConstructorArgumentValues()); visitMutablePropertyValues(beanDefinition.getPropertyValues()); }
| 3,228,011
|
public void visitRuntimeBeanReference(RuntimeBeanReference beanReference) throws BeansException { }
|
public void visitRuntimeBeanReference(RuntimeBeanReference beanReference, Object data) throws BeansException { }
| 3,228,012
|
public ServiceFactory(String contextName){ this.ctx = OmeroContext.getInstance(contextName); }
|
public ServiceFactory(String contextName){ this.ctx = OmeroContext.getInstance(contextName); }
| 3,228,013
|
public JavaConstructor(Constructor[] constructors) { this.constructors = constructors; }
|
public JavaConstructor(Constructor[] constructors) { this.constructors = constructors; }
| 3,228,014
|
private void checkTabPopup(MouseEvent e) { final SparkTab tab = (SparkTab)e.getSource(); if (!e.isPopupTrigger()) { return; } final JPopupMenu popup = new JPopupMenu(); // Handle closing this room. Action closeThisAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { closeTab(chatRoom); } } }; closeThisAction.putValue(Action.NAME, "Close this chat"); popup.add(closeThisAction); if (getChatRooms().size() > 1) { // Handle closing other rooms. Action closeOthersAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { for (ChatRoom cRoom : getChatRooms()) { if (chatRoom != cRoom) { closeTab(cRoom); } } } } }; closeOthersAction.putValue(Action.NAME, "Close all other chats"); popup.add(closeOthersAction); Action closeOldAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { for(ChatRoom rooms : getStaleChatRooms()){ closeTab(rooms); } } }; closeOldAction.putValue(Action.NAME, "Close stale chats"); popup.add(closeOldAction); } popup.show(tab, e.getX(), e.getY()); }
|
private void checkTabPopup(MouseEvent e) { final SparkTab tab = (SparkTab)e.getSource(); if (!e.isPopupTrigger()) { return; } final JPopupMenu popup = new JPopupMenu(); // Handle closing this room. Action closeThisAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { closeTab(chatRoom); } } }; closeThisAction.putValue(Action.NAME, "Close this chat"); popup.add(closeThisAction); if (getChatRooms().size() > 1) { // Handle closing other rooms. Action closeOthersAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { for (ChatRoom cRoom : getChatRooms()) { if (chatRoom != cRoom) { closeTab(cRoom); } } } } }; closeOthersAction.putValue(Action.NAME, "Close all other chats"); popup.add(closeOthersAction); Action closeOldAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { for (ChatRoom rooms : getStaleChatRooms()) { closeTab(rooms); } } }; closeOldAction.putValue(Action.NAME, "Close stale chats"); popup.add(closeOldAction); } popup.show(tab, e.getX(), e.getY()); }
| 3,228,015
|
public void actionPerformed(ActionEvent e) { for(ChatRoom rooms : getStaleChatRooms()){ closeTab(rooms); } }
|
public void actionPerformed(ActionEvent e) { for (ChatRoom rooms : getStaleChatRooms()) { closeTab(rooms); } }
| 3,228,016
|
public void closeActiveRoom() { ChatRoom room = null; try { room = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { // AgentLog.logError("Chat room not found", e1); } // Confirm end session boolean isGroupChat = room.getChatType() == Message.Type.GROUP_CHAT; String message = "Would you like to end this session?"; if (true) { room.closeChatRoom(); return; } else { if (!room.isActive()) { room.closeChatRoom(); return; } } final int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { room.closeChatRoom(); return; } }
|
public void closeActiveRoom() { ChatRoom room = null; try { room = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { // AgentLog.logError("Chat room not found", e1); } // Confirm end session boolean isGroupChat = room.getChatType() == Message.Type.GROUP_CHAT; String message = "Would you like to end this session?"; if (true) { room.closeChatRoom(); return; } else { if (!room.isActive()) { room.closeChatRoom(); return; } } final int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { room.closeChatRoom(); return; } }
| 3,228,017
|
public Collection<ChatRoom> getStaleChatRooms() { final List<ChatRoom> staleRooms = new ArrayList<ChatRoom>(); for (ChatRoom chatRoom : getChatRooms()) { long lastActivity = chatRoom.getLastActivity(); long currentTime = System.currentTimeMillis(); long diff = currentTime - lastActivity; int minutes = (int)(diff / (60 * 1000F)); LocalPreferences pref = SettingsManager.getLocalPreferences(); int timeoutMinutes = pref.getChatLengthDefaultTimeout(); try { ChatRoom activeChatRoom = getActiveChatRoom(); if (activeChatRoom == chatRoom) { continue; } } catch (ChatRoomNotFoundException e) { } if (timeoutMinutes <= minutes) { staleRooms.add(chatRoom); } } return staleRooms; }
|
public Collection<ChatRoom> getStaleChatRooms() { final List<ChatRoom> staleRooms = new ArrayList<ChatRoom>(); for (ChatRoom chatRoom : getChatRooms()) { long lastActivity = chatRoom.getLastActivity(); long currentTime = System.currentTimeMillis(); long diff = currentTime - lastActivity; int minutes = (int)(diff / (60 * 1000F)); LocalPreferences pref = SettingsManager.getLocalPreferences(); int timeoutMinutes = pref.getChatLengthDefaultTimeout(); try { ChatRoom activeChatRoom = getActiveChatRoom(); if (activeChatRoom == chatRoom) { continue; } } catch (ChatRoomNotFoundException e) { } if (timeoutMinutes <= minutes) { staleRooms.add(chatRoom); } } return staleRooms; }
| 3,228,019
|
public void useTabDefault(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); Font font = titleLabel.getFont(); titleLabel.setForeground(Color.black); Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint(); } }
|
public void useTabDefault(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); titleLabel.setForeground(Color.black); Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint(); } }
| 3,228,021
|
public void useTabDefault(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); Font font = titleLabel.getFont(); titleLabel.setForeground(Color.black); Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint(); } }
|
public void useTabDefault(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); Font font = titleLabel.getFont(); titleLabel.setForeground(Color.black); Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint(); } }
| 3,228,022
|
public KernelErrorsError(List errors) { assert errors != null : "errors is null"; assert !errors.isEmpty() : "errors is empty"; assert assertAllErrors(errors); this.errors = Collections.unmodifiableList(errors); }
|
public KernelErrorsError(List errors) { assert errors != null : "errors is null"; assert !errors.isEmpty() : "errors is empty"; assert assertAllErrors(errors); this.errors = Collections.unmodifiableList(errors); }
| 3,228,023
|
public void visitBlockNode(BlockNode iVisited) { Iterator iter = iVisited.iterator(); while (iter.hasNext()) { eval((Node) iter.next()); } }
|
public void visitBlockNode(BlockNode iVisited) { Iterator iter = iVisited.iterator(); while (iter.hasNext()) { eval((Node) iter.next()); } }
| 3,228,024
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject proc = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
| 3,228,025
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (proc.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
| 3,228,026
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
| 3,228,027
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
| 3,228,028
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); if (threadContext.getCurrentFrame().getIter() == Iter.ITER_NOT) { threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); } try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
| 3,228,029
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
|
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().pop(); } }
| 3,228,030
|
public void visitFCallNode(FCallNode iVisited) { Block tmpBlock = threadContext.beginCallArgs(); IRubyObject[] args = null; try { args = setupArgs(runtime, threadContext, iVisited.getArgsNode()); } finally { threadContext.endCallArgs(tmpBlock); } result = self.getMetaClass().call(self, iVisited.getName(), args, CallType.FUNCTIONAL); }
|
public void visitFCallNode(FCallNode iVisited) { Block tmpBlock = threadContext.beginCallArgs(); IRubyObject[] args; try { args = setupArgs(runtime, threadContext, iVisited.getArgsNode()); } finally { threadContext.endCallArgs(tmpBlock); } result = self.getMetaClass().call(self, iVisited.getName(), args, CallType.FUNCTIONAL); }
| 3,228,031
|
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(Block.createBlock(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode(), iVisited.getVarNode()), self)); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { result = eval(iVisited.getIterNode()); return; } catch (RetryJump rExcptn) { } } } catch (BreakJump bExcptn) { IRubyObject breakValue = bExcptn.getBreakValue(); result = breakValue == null ? runtime.getNil() : breakValue; } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().pop(); } }
|
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(Block.createBlock(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode(), iVisited.getVarNode()), self)); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { result = eval(iVisited.getIterNode()); return; } catch (RetryJump rExcptn) { } } } catch (BreakJump bExcptn) { IRubyObject breakValue = bExcptn.getBreakValue(); result = breakValue == null ? runtime.getNil() : breakValue; } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().pop(); } }
| 3,228,032
|
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(Block.createBlock(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode(), iVisited.getVarNode()), self)); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { result = eval(iVisited.getIterNode()); return; } catch (RetryJump rExcptn) { } } } catch (BreakJump bExcptn) { IRubyObject breakValue = bExcptn.getBreakValue(); result = breakValue == null ? runtime.getNil() : breakValue; } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().pop(); } }
|
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(Block.createBlock(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode(), iVisited.getVarNode()), self)); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { result = eval(iVisited.getIterNode()); return; } catch (RetryJump rExcptn) { } } } catch (BreakJump bExcptn) { IRubyObject breakValue = bExcptn.getBreakValue(); result = breakValue == null ? runtime.getNil() : breakValue; } finally { threadContext.getBlockStack().pop(); } }
| 3,228,033
|
private void initOverlayShapes() { int width = getImage().getWidth(null); int height = getImage().getHeight(null); PaintShapeGenerator generator = PaintShapeGenerator.getInstance(); if(multipleModeOn) { Shape prevShape = generator.getPrevImageShape(); Shape nextShape = generator.getNextImageShape(); AffineTransform prevXForm = AffineTransform.getTranslateInstance(5,height-prevShape.getBounds2D().getHeight()-5); AffineTransform nextXForm = AffineTransform.getTranslateInstance(width-nextShape.getBounds2D().getWidth()-5, height-nextShape.getBounds2D().getHeight()-5); this.prevImageShape = prevXForm.createTransformedShape(prevShape); this.nextImageShape = nextXForm.createTransformedShape(nextShape); } BrowserEnvironment env = BrowserEnvironment.getInstance(); IconManager manager = env.getIconManager(); openIconImage = manager.getLargeImage(IconManager.OPEN_IMAGE); closeIconImage = manager.getLargeImage(IconManager.CLOSE_IMAGE); int iconWidth = openIconImage.getWidth(null); int iconHeight = openIconImage.getHeight(null); openIconShape = new Rectangle2D.Double(width-iconWidth-8,50, iconWidth,iconHeight); iconWidth = closeIconImage.getWidth(null); iconHeight = closeIconImage.getHeight(null); closeIconShape = new Rectangle2D.Double(width-iconWidth-8,8, iconWidth,iconHeight); }
|
private void initOverlayShapes() { int width = getImage().getWidth(null); int height = getImage().getHeight(null); PaintShapeGenerator generator = PaintShapeGenerator.getInstance(); if(multipleModeOn) { Shape prevShape = generator.getPrevImageShape(); Shape nextShape = generator.getNextImageShape(); AffineTransform prevXForm = AffineTransform.getTranslateInstance(5,height-prevShape.getBounds2D().getHeight()-5); AffineTransform nextXForm = AffineTransform.getTranslateInstance(width-nextShape.getBounds2D().getWidth()-5, height-nextShape.getBounds2D().getHeight()-5); this.prevImageShape = prevXForm.createTransformedShape(prevShape); this.nextImageShape = nextXForm.createTransformedShape(nextShape); } BrowserEnvironment env = BrowserEnvironment.getInstance(); IconManager manager = env.getIconManager(); openIconImage = manager.getLargeImage(IconManager.ZOOM_BAR); closeIconImage = manager.getLargeImage(IconManager.CLOSE_IMAGE); int iconWidth = openIconImage.getWidth(null); int iconHeight = openIconImage.getHeight(null); openIconShape = new Rectangle2D.Double(width-iconWidth-8,50, iconWidth,iconHeight); iconWidth = closeIconImage.getWidth(null); iconHeight = closeIconImage.getHeight(null); closeIconShape = new Rectangle2D.Double(width-iconWidth-8,8, iconWidth,iconHeight); }
| 3,228,034
|
public Shape getNextImageShape() { GeneralPath path = new GeneralPath(); path.moveTo(0,0); path.lineTo(12,12); path.lineTo(0,24); path.closePath(); return path; }
|
public Shape getNextImageShape() { GeneralPath path = new GeneralPath(); path.moveTo(0,0); path.lineTo(12,12); path.lineTo(0,24); path.closePath(); return path; }
| 3,228,036
|
public synchronized int[] getRGBA(int w) { ChannelBinding[] cb = renderer.getChannelBindings();// int[] rgba = cb[w].getColor, copy = new int[rgba.length];// System.arraycopy(rgba, 0, copy, 0, rgba.length);// return copy; // NOTE: The rgba is supposed to be read-only; however we make a // copy to be on the safe side. int[] rgba = new int[4]; // FIXME rgba[0] = cb[w].getColor().getRed().intValue(); rgba[1] = cb[w].getColor().getGreen().intValue(); rgba[2] = cb[w].getColor().getBlue().intValue(); rgba[3] = cb[w].getColor().getAlpha().intValue(); return rgba; }
|
public synchronized int[] getRGBA(int w) { ChannelBinding[] cb = renderer.getChannelBindings();// int[] rgba = cb[w].getColor, copy = new int[rgba.length];// System.arraycopy(rgba, 0, copy, 0, rgba.length);// return copy; // NOTE: The rgba is supposed to be read-only; however we make a // copy to be on the safe side. int[] rgba = new int[4]; // FIXME rgba[0] = cb[w].getColor().getRed().intValue(); rgba[1] = cb[w].getColor().getGreen().intValue(); rgba[2] = cb[w].getColor().getBlue().intValue(); rgba[3] = cb[w].getColor().getAlpha().intValue(); return rgba; }
| 3,228,037
|
public synchronized void setChannelWindow(int w, double start, double end) { QuantumStrategy qs = renderer.getQuantumManager().getStrategyFor(w); qs.setWindow(start, end); ChannelBinding[] cb = renderer.getChannelBindings(); // FIXME cb[w].setInputWindow(start, end); }
|
cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); publiccb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); synchronizedcb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); voidcb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); setChannelWindow(intcb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); w,cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); doublecb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); start,cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); doublecb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); end)cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); {cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); QuantumStrategycb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); qscb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); =cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); renderer.getQuantumManager().getStrategyFor(w);cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); qs.setWindow(start,cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); end);cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); ChannelBinding[]cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cbcb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); =cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); renderer.getChannelBindings();cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); //cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); FIXMEcb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputWindow(start,cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); end);cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end)); }
| 3,228,038
|
public synchronized void setCodomainInterval(int start, int end) { CodomainChain chain = renderer.getCodomainChain(); chain.setInterval(start, end); RenderingDef rd = renderer.getRenderingDef(); QuantumDef qd = rd.getQuantization(), newQd; newQd = new QuantumDef(); newQd.setBitResolution(qd.getBitResolution()); newQd.setCdStart(Integer.valueOf(start)); newQd.setCdStop(Integer.valueOf(end)); rd.setQuantization(newQd);// FIXME// CodomainMapContext mapCtx;// Iterator i = rd.getCodomainChainDef().iterator();// while (i.hasNext())// {// mapCtx = (CodomainMapContext) i.next();// mapCtx.setCodomain(start, end);// } }
|
public synchronized void setCodomainInterval(int start, int end) {CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } CodomainChain chain = renderer.getCodomainChain();CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } chain.setInterval(start, end);CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } RenderingDef rd = renderer.getRenderingDef();CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } QuantumDef qd = rd.getQuantization(), newQd;CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } newQd = new QuantumDef();CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } newQd.setBitResolution(qd.getBitResolution());CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } newQd.setCdStart(Integer.valueOf(start));CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } newQd.setCdStop(Integer.valueOf(end));CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } rd.setQuantization(newQd);// FIXME//CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } CodomainMapContext mapCtx;//CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } Iterator i = rd.getCodomainChainDef().iterator();//CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } while (i.hasNext())//CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } {//CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } mapCtx = (CodomainMapContext) i.next();//CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } mapCtx.setCodomain(start, end);//CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } } }
| 3,228,039
|
public synchronized void setRGBA(int w, int red, int green, int blue, int alpha) { ChannelBinding[] cb = renderer.getChannelBindings(); // FIXMEcb[w].setRGBA(red, green, blue, alpha); Color c = cb[w].getColor(); c.setRed(Integer.valueOf(red)); c.setGreen(Integer.valueOf(green)); c.setBlue(Integer.valueOf(blue)); c.setAlpha(Integer.valueOf(alpha)); }
|
public synchronized void setRGBA(int w, int red, int green, int blue, int alpha) { ChannelBinding[] cb = renderer.getChannelBindings(); // FIXMEcb[w].setRGBA(red, green, blue, alpha); Color c = cb[w].getColor(); c.setRed(Integer.valueOf(red)); c.setGreen(Integer.valueOf(green)); c.setBlue(Integer.valueOf(blue)); c.setAlpha(Integer.valueOf(alpha)); }
| 3,228,040
|
public double[] getChannelStats(int w); //Do we need that one?
|
public double[] getChannelStats(int w); //Do we need that one?
| 3,228,041
|
public static RenderingDef createDefaultRenderingDef(Pixels metadata, PixelsStats stats) { int c_size = metadata.getSizeC().intValue(); int z_size = metadata.getSizeZ().intValue(); QuantumDef qDef = new QuantumDef(); qDef.setBitResolution(QuantumFactory.DEPTH_8BIT); qDef.setCdStart(0); qDef.setCdStop(QuantumFactory.DEPTH_8BIT); ChannelBindings[] waves = new ChannelBindings[c_size]; PixTStatsEntry wGlobal; int[] rgb = ColorsFactory.getColor(0,0); // FIXME was empty Channel pixData; boolean active = false; int model = RenderingDefConstants.GS; Map map = getPixelsChannelData(metadata); for (int w = 0; w < c_size; ++w) { pixData = (Channel) map.get(new Integer(w)); wGlobal = stats.getGlobalEntry(w);/* FIXME : very broken. ColorDomain and pixData.get_wave_lengths aren't there.*/// if (pixData == null) rgb = ColorsFactory.getColor(w, -1);// else rgb = ColorsFactory.getColor(w, 0);// FIXME FIXME pixData.getEm...);// if (pixData != null && // pixData.getColorDomain() == RGB_COLOR_DOMAIN) {// active = true;// model = RenderingDefConstants.RGB;// } waves[w] = new ChannelBindings(w, wGlobal.globalMin, wGlobal.globalMax, rgb, active, QuantumFactory.LINEAR, 1); } waves[0].setActive(true); //NOTE: dims object enforces 1 < sizeC. RenderingDef newRD = new RenderingDef(); int defaultZ = z_size/2+z_size%2-1; newRD.setDefaultZ(Integer.valueOf(defaultZ)); newRD.setDefaultT(Integer.valueOf(0)); newRD.setModel(RenderingDefConstants.convertToType(model)); newRD.setQuantization(qDef); newRD.setWaveRendering(new HashSet(Arrays.asList(waves))); return newRD; }
|
public static RenderingDef createDefaultRenderingDef(Pixels metadata, PixelsStats stats) { int c_size = metadata.getSizeC().intValue(); int z_size = metadata.getSizeZ().intValue(); QuantumDef qDef = new QuantumDef(); qDef.setBitResolution(QuantumFactory.DEPTH_8BIT); qDef.setCdStart(0); qDef.setCdStop(QuantumFactory.DEPTH_8BIT); ChannelBindings[] waves = new ChannelBindings[c_size]; PixTStatsEntry wGlobal; int[] rgb = ColorsFactory.getColor(0,0); // FIXME was empty Channel pixData; boolean active = false; int model = RenderingDefConstants.GS; Map map = getPixelsChannelData(metadata); for (int w = 0; w < c_size; ++w) { pixData = (Channel) map.get(new Integer(w)); wGlobal = stats.getGlobalEntry(w);/* FIXME : very broken. ColorDomain and pixData.get_wave_lengths aren't there.*/// if (pixData == null) rgb = ColorsFactory.getColor(w, -1);// else rgb = ColorsFactory.getColor(w, 0);// FIXME FIXME pixData.getEm...);// if (pixData != null && // pixData.getColorDomain() == RGB_COLOR_DOMAIN) {// active = true;// model = RenderingDefConstants.RGB;// } waves[w] = new ChannelBindings(w, wGlobal.globalMin, wGlobal.globalMax, rgb, active, QuantumFactory.LINEAR, 1); } waves[0].setActive(true); //NOTE: dims object enforces 1 < sizeC. RenderingDef newRD = new RenderingDef(); int defaultZ = z_size/2+z_size%2-1; newRD.setDefaultZ(Integer.valueOf(defaultZ)); newRD.setDefaultT(Integer.valueOf(0)); newRD.setModel(RenderingDefConstants.convertToType(model)); newRD.setQuantization(qDef); newRD.setWaveRendering(new HashSet(Arrays.asList(waves))); return newRD; }
| 3,228,042
|
public Renderer(IPixels iPixels, Pixels pixelsObj, RenderingDef renderingDefObj, PixelBuffer bufferObj) { metadata = pixelsObj; rndDef = renderingDefObj; buffer = bufferObj; this.iPixels = iPixels; if (metadata == null) throw new NullPointerException("Expecting not null metadata"); else if (rndDef == null) throw new NullPointerException("Expecting not null rndDef"); else if (buffer == null) throw new NullPointerException("Expecting not null buffer"); //Create and configure the quantum strategies. QuantumDef qd = rndDef.getQuantization(); quantumManager = new QuantumManager(metadata); ChannelBinding[] cBindings= getChannelBindings(); quantumManager.initStrategies(qd, metadata.getPixelsType(), cBindings); //Compute the location stats. computeLocationStats(getDefaultPlaneDef()); //Create and configure the codomain chain. codomainChain = new CodomainChain(qd.getCdStart().intValue(), qd.getCdEnd().intValue(), rndDef.getSpatialDomainEnhancement()); //Create an appropriate rendering strategy. renderingStrategy = RenderingStrategy.makeNew(rndDef.getModel()); }
|
public Renderer(IPixels iPixels, Pixels pixelsObj, RenderingDef renderingDefObj, PixelBuffer bufferObj) { metadata = pixelsObj; rndDef = renderingDefObj; buffer = bufferObj; this.iPixels = iPixels; if (metadata == null) throw new NullPointerException("Expecting not null metadata"); else if (rndDef == null) throw new NullPointerException("Expecting not null rndDef"); else if (buffer == null) throw new NullPointerException("Expecting not null buffer"); //Create and configure the quantum strategies. QuantumDef qd = rndDef.getQuantization(); quantumManager = new QuantumManager(metadata); ChannelBinding[] cBindings= getChannelBindings(); quantumManager.initStrategies(qd, metadata.getPixelsType(), cBindings); //Compute the location stats. computeLocationStats(getDefaultPlaneDef()); //Create and configure the codomain chain. codomainChain = new CodomainChain(qd.getCdStart().intValue(), qd.getCdEnd().intValue(), rndDef.getSpatialDomainEnhancement()); //Create an appropriate rendering strategy. renderingStrategy = RenderingStrategy.makeNew(rndDef.getModel()); }
| 3,228,043
|
public Renderer(IPixels iPixels, Pixels pixelsObj, RenderingDef renderingDefObj, PixelBuffer bufferObj) { metadata = pixelsObj; rndDef = renderingDefObj; buffer = bufferObj; this.iPixels = iPixels; if (metadata == null) throw new NullPointerException("Expecting not null metadata"); else if (rndDef == null) throw new NullPointerException("Expecting not null rndDef"); else if (buffer == null) throw new NullPointerException("Expecting not null buffer"); //Create and configure the quantum strategies. QuantumDef qd = rndDef.getQuantization(); quantumManager = new QuantumManager(metadata); ChannelBinding[] cBindings= getChannelBindings(); quantumManager.initStrategies(qd, metadata.getPixelsType(), cBindings); //Compute the location stats. computeLocationStats(getDefaultPlaneDef()); //Create and configure the codomain chain. codomainChain = new CodomainChain(qd.getCdStart().intValue(), qd.getCdEnd().intValue(), rndDef.getSpatialDomainEnhancement()); //Create an appropriate rendering strategy. renderingStrategy = RenderingStrategy.makeNew(rndDef.getModel()); }
|
public Renderer(IPixels iPixels, Pixels pixelsObj, RenderingDef renderingDefObj, PixelBuffer bufferObj) { metadata = pixelsObj; rndDef = renderingDefObj; buffer = bufferObj; this.iPixels = iPixels; if (metadata == null) throw new NullPointerException("Expecting not null metadata"); else if (rndDef == null) throw new NullPointerException("Expecting not null rndDef"); else if (buffer == null) throw new NullPointerException("Expecting not null buffer"); //Create and configure the quantum strategies. QuantumDef qd = rndDef.getQuantization(); quantumManager = new QuantumManager(metadata, iPixels); ChannelBinding[] cBindings= getChannelBindings(); quantumManager.initStrategies(qd, metadata.getPixelsType(), cBindings); //Compute the location stats. computeLocationStats(getDefaultPlaneDef()); //Create and configure the codomain chain. codomainChain = new CodomainChain(qd.getCdStart().intValue(), qd.getCdEnd().intValue(), rndDef.getSpatialDomainEnhancement()); //Create an appropriate rendering strategy. renderingStrategy = RenderingStrategy.makeNew(rndDef.getModel()); }
| 3,228,044
|
public Renderer(IPixels iPixels, Pixels pixelsObj, RenderingDef renderingDefObj, PixelBuffer bufferObj) { metadata = pixelsObj; rndDef = renderingDefObj; buffer = bufferObj; this.iPixels = iPixels; if (metadata == null) throw new NullPointerException("Expecting not null metadata"); else if (rndDef == null) throw new NullPointerException("Expecting not null rndDef"); else if (buffer == null) throw new NullPointerException("Expecting not null buffer"); //Create and configure the quantum strategies. QuantumDef qd = rndDef.getQuantization(); quantumManager = new QuantumManager(metadata); ChannelBinding[] cBindings= getChannelBindings(); quantumManager.initStrategies(qd, metadata.getPixelsType(), cBindings); //Compute the location stats. computeLocationStats(getDefaultPlaneDef()); //Create and configure the codomain chain. codomainChain = new CodomainChain(qd.getCdStart().intValue(), qd.getCdEnd().intValue(), rndDef.getSpatialDomainEnhancement()); //Create an appropriate rendering strategy. renderingStrategy = RenderingStrategy.makeNew(rndDef.getModel()); }
|
public Renderer(IPixels iPixels, Pixels pixelsObj, RenderingDef renderingDefObj, PixelBuffer bufferObj) { metadata = pixelsObj; rndDef = renderingDefObj; buffer = bufferObj; this.iPixels = iPixels; if (metadata == null) throw new NullPointerException("Expecting not null metadata"); else if (rndDef == null) throw new NullPointerException("Expecting not null rndDef"); else if (buffer == null) throw new NullPointerException("Expecting not null buffer"); //Create and configure the quantum strategies. QuantumDef qd = rndDef.getQuantization(); quantumManager = new QuantumManager(metadata); ChannelBinding[] cBindings= getChannelBindings(); quantumManager.initStrategies(qd, metadata.getPixelsType(), cBindings); //Compute the location stats. computeLocationStats(getDefaultPlaneDef()); //Create and configure the codomain chain. codomainChain = new CodomainChain(qd.getCdStart().intValue(), qd.getCdEnd().intValue(), rndDef.getSpatialDomainEnhancement()); //Create an appropriate rendering strategy. renderingStrategy = RenderingStrategy.makeNew(rndDef.getModel()); }
| 3,228,045
|
public static Color getColor(int index, Channel channel) { Color c = ColorsFactory.getColor(channel); if (c != null) return c; switch (index) { case 0: return BLUE_COLOR; case 1: return GREEN_COLOR; default: return RED_COLOR; } }
|
private static Color getColor(Channel channel) { Color c = ColorsFactory.getColor(channel); if (c != null) return c; switch (index) { case 0: return BLUE_COLOR; case 1: return GREEN_COLOR; default: return RED_COLOR; } }
| 3,228,046
|
public static Color getColor(int index, Channel channel) { Color c = ColorsFactory.getColor(channel); if (c != null) return c; switch (index) { case 0: return BLUE_COLOR; case 1: return GREEN_COLOR; default: return RED_COLOR; } }
|
public static Color getColor(int index, Channel channel) { Color c = ColorsFactory.getColor(channel); if (c != null) return c; switch (index) { case 0: return BLUE_COLOR; case 1: return GREEN_COLOR; default: return RED_COLOR; } }
| 3,228,047
|
public void setDefaultT(int t); //Is it the best way to do it?
|
public void setDefaultT(int t); //Is it the best way to do it?
| 3,228,048
|
public void setDefaultZ(int z); //Is it the best way to do it?
|
public void setDefaultZ(int z); //Is it the best way to do it?
| 3,228,049
|
public IObject find(@NotNull final Class klass, final long id) { return (IObject) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { IObject o = (IObject) session.get(klass,id); Hibernate.initialize(o); return o; } }); }
|
public IObject find(@NotNull final Class klass, final long id) { return (IObject) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { IObject o = (IObject) session.get(klass,id); return o; } }); }
| 3,228,050
|
public Object doInHibernate(Session session) throws HibernateException { IObject o = (IObject) session.get(klass,id); Hibernate.initialize(o); return o; }
|
public Object doInHibernate(Session session) throws HibernateException { IObject o = (IObject) session.get(klass,id); return o; }
| 3,228,051
|
public IObject get(@NotNull final Class klass, final long id) throws ValidationException { return (IObject) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { IObject o = null; try { o = (IObject) session.load(klass,id); } catch (ObjectNotFoundException onfe) { throw new ApiUsageException(String.format( "The requested object (%s,%s) is not available.\n" + "Please use IQuery.find to deteremine existance.\n", klass.getName(),id)); } Hibernate.initialize(o); return o; } }); }
|
public IObject get(@NotNull final Class klass, final long id) throws ValidationException { return (IObject) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { IObject o = null; try { o = (IObject) session.load(klass,id); } catch (ObjectNotFoundException onfe) { throw new ApiUsageException(String.format( "The requested object (%s,%s) is not available.\n" + "Please use IQuery.find to deteremine existance.\n", klass.getName(),id)); } return o; } }); }
| 3,228,052
|
public Object doInHibernate(Session session) throws HibernateException { IObject o = null; try { o = (IObject) session.load(klass,id); } catch (ObjectNotFoundException onfe) { throw new ApiUsageException(String.format( "The requested object (%s,%s) is not available.\n" + "Please use IQuery.find to deteremine existance.\n", klass.getName(),id)); } Hibernate.initialize(o); return o; }
|
public Object doInHibernate(Session session) throws HibernateException { IObject o = null; try { o = (IObject) session.load(klass,id); } catch (ObjectNotFoundException onfe) { throw new ApiUsageException(String.format( "The requested object (%s,%s) is not available.\n" + "Please use IQuery.find to deteremine existance.\n", klass.getName(),id)); } return o; }
| 3,228,053
|
int translateFlags(int options) { int flags = Pattern.MULTILINE; if ((options & ReOptions.RE_OPTION_IGNORECASE) > 0) { flags |= Pattern.CASE_INSENSITIVE; } if ((options & ReOptions.RE_OPTION_EXTENDED) > 0) { flags |= Pattern.COMMENTS; } if ((options & ReOptions.RE_OPTION_MULTILINE) > 0) { flags |= Pattern.DOTALL; } return flags; }
|
int translateFlags(int options) { int flags = Pattern.MULTILINE; if ((options & ReOptions.RE_OPTION_IGNORECASE) > 0) { flags |= Pattern.CASE_INSENSITIVE; } if ((options & ReOptions.RE_OPTION_EXTENDED) > 0) { flags |= Pattern.COMMENTS; } if ((options & ReOptions.RE_OPTION_MULTILINE) > 0) { flags |= Pattern.DOTALL; } return flags; }
| 3,228,055
|
String translatePattern(String regex, boolean commentsAllowed) { regex = COMMENT_PATTERN.matcher(regex).replaceAll(""); regex = HEX_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll("\\\\"+"x0$1"); regex = OCTAL_MISSING_ZERO_PATTERN.matcher(regex).replaceAll("\\\\"+"0$1"); if (commentsAllowed) { regex = SPACE_IN_CHARACTER_CLASS_PATTERN.matcher(regex).replaceAll("$1\\\\x20$2"); regex = SHARP_IN_CHARACTER_CLASS_PATTERN.matcher(regex).replaceAll("$1\\\\x23$2"); } return regex; }
|
String translatePattern(String regex, boolean commentsAllowed) { regex = COMMENT_PATTERN.matcher(regex).replaceAll(""); regex = HEX_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll("\\\\"+"x0$1"); regex = OCTAL_MISSING_ZERO_PATTERN.matcher(regex).replaceAll("\\\\"+"0$1"); if (commentsAllowed) { regex = SPACE_IN_CHARACTER_CLASS_PATTERN.matcher(regex).replaceAll("$1\\\\x20$2"); regex = SHARP_IN_CHARACTER_CLASS_PATTERN.matcher(regex).replaceAll("$1\\\\x23$2"); } return regex; }
| 3,228,056
|
public RubyClass newSubClass(String name, RubyModule parent) { return new StringMetaClass(name, this, parent); }
|
public RubyClass newSubClass(String name, RubyModule parent) { return new StringMetaClass(name, this, parent); }
| 3,228,057
|
public void defineMethod(String name, Arity arity, String java_name) { assert name != null; assert arity != null; assert java_name != null; Visibility visibility = name.equals("initialize") ? Visibility.PRIVATE : Visibility.PUBLIC; addMethod(name, new ReflectedMethod(this, builtinClass, java_name, arity, visibility)); }
|
public void defineMethod(String name, Arity arity, String java_name) { assert name != null; assert arity != null; assert java_name != null; Visibility visibility = name.equals("initialize") ? Visibility.PRIVATE : Visibility.PUBLIC; addMethod(name, new ReflectedMethod(this, builtinClass, java_name, arity, visibility)); }
| 3,228,058
|
protected ObjectMetaClass(String name, Class builtinClass, RubyClass superClass) { this(name, builtinClass, superClass, superClass.getRuntime().getClass("Object").getCRef()); }
|
protected ObjectMetaClass(String name, Class builtinClass, RubyClass superClass) { this(name, builtinClass, superClass, superClass.getRuntime().getClass("Object").getCRef()); }
| 3,228,059
|
public void handleBackgroundClick() { System.err.println("handling background click.."); hideLastChainView(); super.handleBackgroundClick(); SelectAnalysisChain event = new SelectAnalysisChain(null); registry.getEventBus().post(event); }
|
public void handleBackgroundClick() { System.err.println("handling background click.."); hideLastChainView(); super.handleBackgroundClick(); SelectAnalysisChain event = new SelectAnalysisChain(null); registry.getEventBus().post(event); }
| 3,228,060
|
public void hideLastChainView() { if (lastChainView != null) { lastChainView.hide(); } lastChainView = null; }
|
public void hideLastChainView() { if (lastChainView != null) { lastChainView.hide(); } lastChainView = null; }
| 3,228,061
|
public void mouseExited(PInputEvent e) { PNode n = e.getPickedNode(); if (n instanceof ChainBox) checkExit((ChainBox) n,e); else super.mouseExited(e); e.setHandled(true); }
|
public void mouseExited(PInputEvent e) { PNode n = e.getPickedNode(); if (n instanceof ChainBox) checkExit((ChainBox) n,e); else super.mouseExited(e); e.setHandled(true); }
| 3,228,063
|
public void setLastChainView(PaletteChainView lastChainView) { System.err.println("last chain view is ..."+lastChainView); this.lastChainView = lastChainView; }
|
public void setLastChainView(PaletteChainView lastChainView) { System.err.println("last chain view is ..."+lastChainView); this.lastChainView = lastChainView; }
| 3,228,064
|
protected void setLastEntered(PNode node) { System.err.println("setting last entered to .."+node); if (lastChainView != null && lastChainView != node && node != null && !lastChainView.isAncestorOf(node)) hideLastChainView(); if (node instanceof ChainBox) { ChainBox cb = (ChainBox)node; if (cb.getChainView() instanceof PaletteChainView) lastChainView = (PaletteChainView) cb.getChainView(); } super.setLastEntered(node); }
|
protected void setLastEntered(PNode node) { System.err.println("setting last entered to .."+node); if (lastChainView != null && lastChainView != node && node != null && !lastChainView.isAncestorOf(node)) hideLastChainView(); if (node instanceof ChainBox) { ChainBox cb = (ChainBox)node; if (cb.getChainView() instanceof PaletteChainView) lastChainView = (PaletteChainView) cb.getChainView(); } super.setLastEntered(node); }
| 3,228,065
|
protected void setLastEntered(PNode node) { System.err.println("setting last entered to .."+node); if (lastChainView != null && lastChainView != node && node != null && !lastChainView.isAncestorOf(node)) hideLastChainView(); if (node instanceof ChainBox) { ChainBox cb = (ChainBox)node; if (cb.getChainView() instanceof PaletteChainView) lastChainView = (PaletteChainView) cb.getChainView(); } super.setLastEntered(node); }
|
protected void setLastEntered(PNode node) { System.err.println("setting last entered to .."+node); if (lastChainView != null && lastChainView != node && node != null && !lastChainView.isAncestorOf(node)) hideLastChainView(); if (node instanceof ChainBox) { ChainBox cb = (ChainBox)node; if (cb.getChainView() instanceof PaletteChainView) lastChainView = (PaletteChainView) cb.getChainView(); } super.setLastEntered(node); }
| 3,228,066
|
private void setSelectedChain(ChainView chain) { System.err.println("setting selected chain.."+chain.getChain().getName()); if (chain != null && chain.getChain() != null) { ((ChainPaletteCanvas) canvas).setDraggingChain(chain.getChain());; } }
|
private void setSelectedChain(ChainView chain) { System.err.println("setting selected chain.."+chain.getChain().getName()); if (chain != null && chain.getChain() != null) { ((ChainPaletteCanvas) canvas).setDraggingChain(chain.getChain());; } }
| 3,228,067
|
public void activate(Rectangle bounds) { switch (model.getState()) { case NEW: model.fireHierarchyLoading(); view.setComponentBounds(bounds); //view.setOnScreen(); fireStateChange(); break; case DISCARDED: throw new IllegalStateException( "This method can't be invoked in the DISCARDED state."); default: view.deIconify(); } }
|
publicvoidactivate(Rectanglebounds){switch(model.getState()){caseNEW:model.fireHierarchyLoading();view.setComponentBounds(bounds);//view.setOnScreen();fireStateChange();break;caseDISCARDED:thrownewIllegalStateException("Thismethodcan'tbeinvokedintheDISCARDEDstate.");default:view.deIconify();}}
| 3,228,068
|
public TreeView getTreeView() { int state = model.getState(); if (state == NEW && state == DISCARDED) throw new IllegalStateException( "This method cannot be invoked in the NEW "+ "or DISCARDED state."); TreeView treeView = model.getTreeView(); if (treeView == null) { model.createTreeView(); treeView = model.getTreeView(); treeView.addPropertyChangeListener(controller); } return treeView; }
|
public TreeView getTreeView() { int state = model.getState(); if (state == NEW && state == DISCARDED) throw new IllegalStateException( "This method cannot be invoked in the NEW "+ "or DISCARDED state."); TreeView treeView = model.getTreeView(); if (treeView == null) { model.createTreeView(); treeView = model.getTreeView(); treeView.addPropertyChangeListener(controller); } return treeView; }
| 3,228,069
|
protected Java getJava() { if (java == null) { java = (Java)getProject().createTask("java"); java.setTaskName(getTaskName()); java.setClassname(getClassName()); java.setFork(true); java.setDir(getProject().getBaseDir()); /** * We replace %20 with a space character because, for some * reason, when we call Cobertura from within CruiseControl, * the classpath here contains %20's instead of spaces. I * don't know if this is our problem, or CruiseControl, or * ant, but this seems to fix it. --Mark */ if (getClass().getClassLoader() instanceof AntClassLoader) { String classpath = ((AntClassLoader)getClass() .getClassLoader()).getClasspath(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } else if (getClass().getClassLoader() instanceof URLClassLoader) { URL[] earls = ((URLClassLoader)getClass().getClassLoader()) .getURLs(); for (int i = 0; i < earls.length; i++) { String classpath = earls[i].getFile(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } } } return java; }
|
protected Java getJava() { if (java == null) { java = (Java)getProject().createTask("java"); java.setTaskName(getTaskName()); java.setClassname(getClassName()); java.setFork(true); java.setDir(getProject().getBaseDir()); /** * We replace %20 with a space character because, for some * reason, when we call Cobertura from within CruiseControl, * the classpath here contains %20's instead of spaces. I * don't know if this is our problem, or CruiseControl, or * ant, but this seems to fix it. --Mark */ if (getClass().getClassLoader() instanceof AntClassLoader) { String classpath = ((AntClassLoader)getClass() .getClassLoader()).getClasspath(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } else if (getClass().getClassLoader() instanceof URLClassLoader) { URL[] earls = ((URLClassLoader)getClass().getClassLoader()) .getURLs(); for (int i = 0; i < earls.length; i++) { String classpath = earls[i].getFile(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } } } return java; }
| 3,228,075
|
public static Pixels createPixelGraph(Pixels example) { Pixels p = new Pixels(); AcquisitionContext ac = new AcquisitionContext(); PhotometricInterpretation pi = new PhotometricInterpretation(); AcquisitionMode mode = new AcquisitionMode(); PixelsType pt = new PixelsType(); DimensionOrder dO = new DimensionOrder(); PixelsDimensions pd = new PixelsDimensions(); Image i = new Image(); Channel c = new Channel(); if (example != null) { p.setId(example.getId()); p.setVersion(example.getVersion()); // everything else unloaded. ac.setId(example.getAcquisitionContext().getId()); ac.unload(); pt.setId(example.getPixelsType().getId()); pt.unload(); dO.setId(example.getDimensionOrder().getId()); dO.unload(); pd.setId(example.getPixelsDimensions().getId()); pd.unload(); i.setId(example.getImage().getId()); i.unload(); c.setId(((Channel)example.getChannels().get(0)).getId()); c.unload(); } else { mode.setValue("test"+System.currentTimeMillis()); pi.setValue("test"+System.currentTimeMillis()); ac.setPhotometricInterpretation(pi); ac.setMode(mode); pt.setValue("test"+System.currentTimeMillis()); dO.setValue("XXXX"+System.currentTimeMillis()); pd.setSizeX(new Float(1.0)); pd.setSizeY(new Float(1.0)); pd.setSizeZ(new Float(1.0)); c.setPixels(p); i.setName("test"); } p.setSizeX(new Integer(1)); p.setSizeY(new Integer(1)); p.setSizeZ(new Integer(1)); p.setSizeC(new Integer(1)); p.setSizeT(new Integer(1)); p.setSha1("09bc7b2dcc9a510f4ab3a40c47f7a4cb77954356"); // "pixels" p.setAcquisitionContext(ac); p.setPixelsType(pt); p.setDimensionOrder(dO); p.setPixelsDimensions(pd); p.setImage(i); List channels = new ArrayList(); channels.add(c); p.setChannels(channels); // Reverse links // FIXME i.setActivePixels(p); p.setDetails(new Details()); return p; }
|
public static Pixels createPixelGraph(Pixels example) { Pixels p = new Pixels(); AcquisitionContext ac = new AcquisitionContext(); PhotometricInterpretation pi = new PhotometricInterpretation(); AcquisitionMode mode = new AcquisitionMode(); PixelsType pt = new PixelsType(); DimensionOrder dO = new DimensionOrder(); PixelsDimensions pd = new PixelsDimensions(); Image i = new Image(); Channel c = new Channel(); if (example != null) { p.setId(example.getId()); p.setVersion(example.getVersion()); // everything else unloaded. ac.setId(example.getAcquisitionContext().getId()); ac.unload(); pt.setId(example.getPixelsType().getId()); pt.unload(); dO.setId(example.getDimensionOrder().getId()); dO.unload(); pd.setId(example.getPixelsDimensions().getId()); pd.unload(); i.setId(example.getImage().getId()); i.unload(); c.setId(((Channel)example.getChannels().get(0)).getId()); c.unload(); } else { mode.setValue("test"+System.currentTimeMillis()); pi.setValue("test"+System.currentTimeMillis()); ac.setPhotometricInterpretation(pi); ac.setMode(mode); pt.setValue("int8"); dO.setValue("XXXX"+System.currentTimeMillis()); pd.setSizeX(new Float(1.0)); pd.setSizeY(new Float(1.0)); pd.setSizeZ(new Float(1.0)); c.setPixels(p); i.setName("test"); } p.setSizeX(new Integer(1)); p.setSizeY(new Integer(1)); p.setSizeZ(new Integer(1)); p.setSizeC(new Integer(1)); p.setSizeT(new Integer(1)); p.setSha1("09bc7b2dcc9a510f4ab3a40c47f7a4cb77954356"); // "pixels" p.setAcquisitionContext(ac); p.setPixelsType(pt); p.setDimensionOrder(dO); p.setPixelsDimensions(pd); p.setImage(i); List channels = new ArrayList(); channels.add(c); p.setChannels(channels); // Reverse links // FIXME i.setActivePixels(p); p.setDetails(new Details()); return p; }
| 3,228,077
|
public ComponentMap(Settings initProps) { _config = initProps; }
|
public ComponentMap(Settings initProps) { _config = initProps; }
| 3,228,079
|
public void load(String namelist, String suffix) { load(tokenize(namelist), suffix); }
|
public void load(String namelist, String suffix) { load(tokenize(namelist), suffix); }
| 3,228,080
|
public String asSymbol() { throw getRuntime().newTypeError(inspect().getValue() + " is not a symbol"); }
|
public String asSymbol() { throw getRuntime().newTypeError(inspect().toString() + " is not a symbol"); }
| 3,228,081
|
public IRubyObject evalUnder(RubyModule under, IRubyObject src, IRubyObject file, IRubyObject line) { /* if (ruby_safe_level >= 4) { Check_Type(src, T_STRING); } else { Check_SafeStr(src); } */ return under.executeUnder(new Callback() { public IRubyObject execute(IRubyObject self, IRubyObject[] args) { IRubyObject source = args[1]; IRubyObject filename = args[2]; IRubyObject lineNumber = args[3]; return args[0].eval(source, self.getRuntime().getNil(), ((RubyString) filename).getValue(), RubyNumeric.fix2int(lineNumber)); } public Arity getArity() { return Arity.optional(); } }, new IRubyObject[] { this, src, file, line }); }
|
public IRubyObject evalUnder(RubyModule under, IRubyObject src, IRubyObject file, IRubyObject line) { /* if (ruby_safe_level >= 4) { Check_Type(src, T_STRING); } else { Check_SafeStr(src); } */ return under.executeUnder(new Callback() { public IRubyObject execute(IRubyObject self, IRubyObject[] args) { IRubyObject source = args[1]; IRubyObject filename = args[2]; IRubyObject lineNumber = args[3]; return args[0].eval(source, self.getRuntime().getNil(), ((RubyString) filename).toString(), RubyNumeric.fix2int(lineNumber)); } public Arity getArity() { return Arity.optional(); } }, new IRubyObject[] { this, src, file, line }); }
| 3,228,082
|
public IRubyObject execute(IRubyObject self, IRubyObject[] args) { IRubyObject source = args[1]; IRubyObject filename = args[2]; IRubyObject lineNumber = args[3]; return args[0].eval(source, self.getRuntime().getNil(), ((RubyString) filename).getValue(), RubyNumeric.fix2int(lineNumber)); }
|
public IRubyObject execute(IRubyObject self, IRubyObject[] args) { IRubyObject source = args[1]; IRubyObject filename = args[2]; IRubyObject lineNumber = args[3]; return args[0].eval(source, self.getRuntime().getNil(), ((RubyString) filename).toString(), RubyNumeric.fix2int(lineNumber)); }
| 3,228,083
|
public String toString() { return ((RubyString) callMethod("to_s")).getValue(); }
|
public String toString() { return ((RubyString) callMethod("to_s")).toString(); }
| 3,228,084
|
public RubyString to_s() { String cname = getMetaClass().getRealClass().getName(); RubyString str = getRuntime().newString(""); /* 6:tags 16:addr 1:eos */ str.setValue("#<" + cname + ":0x" + Integer.toHexString(System.identityHashCode(this)) + ">"); str.setTaint(isTaint()); return str; }
|
public RubyString to_s() { String cname = getMetaClass().getRealClass().getName(); /* 6:tags 16:addr 1:eos */ str.setValue("#<" + cname + ":0x" + Integer.toHexString(System.identityHashCode(this)) + ">"); str.setTaint(isTaint()); return str; }
| 3,228,085
|
public RubyString to_s() { String cname = getMetaClass().getRealClass().getName(); RubyString str = getRuntime().newString(""); /* 6:tags 16:addr 1:eos */ str.setValue("#<" + cname + ":0x" + Integer.toHexString(System.identityHashCode(this)) + ">"); str.setTaint(isTaint()); return str; }
|
public RubyString to_s() { String cname = getMetaClass().getRealClass().getName(); RubyString str = getRuntime().newString(""); /* 6:tags 16:addr 1:eos */ RubyString str = getRuntime().newString("#<" + cname + ":0x" + Integer.toHexString(System.identityHashCode(this)) + ">"); str.setTaint(isTaint()); return str; }
| 3,228,086
|
public RaiseException newNoMethodError(String message);
|
public RaiseException newNoMethodError(String message);
| 3,228,087
|
public static void main(String arg[]) { try { EncodingCache ec = new EncodingCache("UTF8", 11, 3); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = in.readLine()) != null) { s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) ); System.out.println("]"); } } catch (Exception e) { e.printStackTrace(); } }
|
public static void main(String arg[]) { try { /** byte[] prefix = getPrefix(arg[0]); System.out.println("Prefix for " + arg[0] + " is " + prefix.length + " bytes long"); */ EncodingCache ec = new EncodingCache("UTF16-LE", 11, 3); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = in.readLine()) != null) { s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) ); System.out.println("]"); } } catch (Exception e) { e.printStackTrace(); } }
| 3,228,088
|
public static void main(String arg[]) { try { EncodingCache ec = new EncodingCache("UTF8", 11, 3); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = in.readLine()) != null) { s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) ); System.out.println("]"); } } catch (Exception e) { e.printStackTrace(); } }
|
public static void main(String arg[]) { try { EncodingCache ec = new EncodingCache("UTF8", 11, 3); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = in.readLine()) != null) { s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) ); System.out.println("]"); } } catch (Exception e) { e.printStackTrace(); } }
| 3,228,089
|
public void respondDrag(PInputEvent e) { currentSelectPoint = e.getCamera().viewToLocal(e.getPosition()); repaint(); }
|
public void respondDrag(PInputEvent e) { double originalX = selectionAnchorPoint.getX(); double originalY = selectionAnchorPoint.getY(); double newX = e.getPosition().getX(); double newY = e.getPosition().getY(); double minX = Math.min(originalX,newX); double minY = Math.min(originalY,newY); double maxX = Math.max(originalX,newX); double maxY = Math.max(originalY,newY); selectionNode.setBounds(minX,minY, maxX-minX,maxY-minY); repaint(); }
| 3,228,090
|
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
|
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(selectionAnchorPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
| 3,228,091
|
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
|
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(selectionAnchorPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
| 3,228,092
|
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
|
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(selectionAnchorPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
| 3,228,093
|
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
|
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(selectionAnchorPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
| 3,228,094
|
public void respondStartDrag(PInputEvent e) { Point2D position = e.getPosition(); Dimension2D offset = e.getDelta(); initialSelectPoint = new Point2D.Double(position.getX()- offset.getWidth(), position.getY()- offset.getHeight()); Point2D dummy = new Point2D.Double(initialSelectPoint.getX(), initialSelectPoint.getY()); initialViewPoint = e.getCamera().viewToLocal(dummy); currentSelectPoint = e.getCamera().viewToLocal(position); int modifier = PiccoloModifiers.getModifier(e); if(modifier != PiccoloModifiers.MOUSE_INDIV_SELECT && modifier != PiccoloModifiers.SHIFT_DOWN) { browserModel.deselectAllThumbnails(); } browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTING_MODE); }
|
public void respondStartDrag(PInputEvent e) { Point2D position = e.getPosition(); Dimension2D offset = e.getDelta(); initialSelectPoint = new Point2D.Double(position.getX()- offset.getWidth(), position.getY()- offset.getHeight()); Point2D dummy = new Point2D.Double(initialSelectPoint.getX(), initialSelectPoint.getY()); initialViewPoint = e.getCamera().viewToLocal(dummy); currentSelectPoint = e.getCamera().viewToLocal(position); int modifier = PiccoloModifiers.getModifier(e); if(modifier != PiccoloModifiers.MOUSE_INDIV_SELECT && modifier != PiccoloModifiers.SHIFT_DOWN) { browserModel.deselectAllThumbnails(); } browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTING_MODE); }
| 3,228,096
|
public void updateConstraints() { Dimension dimension = getSize(); double width = dimension.getWidth(); double height = dimension.getHeight(); double xRatio = width / footprint.getWidth(); double yRatio = height / footprint.getHeight(); if(Math.min(xRatio,yRatio) != minZoomLevel) { minZoomLevel = Math.min(xRatio,yRatio); if(minZoomLevel < 0.05) { minZoomLevel = 0.05; } else if(minZoomLevel > 0.75) { minZoomLevel = 0.75; } for(Iterator iter = zoomParamListeners.iterator(); iter.hasNext();) { ZoomParamListener listener = (ZoomParamListener)iter.next(); listener.minZoomLevelChanged(minZoomLevel); } } // for some reason, setting setViewScale(0) screws things up // in a big way. if(scaleToShow) { if((xRatio < 1 || yRatio < 1) && (xRatio != 0 && yRatio != 0)) { double min = Math.min(xRatio,yRatio); getCamera().setViewScale(min); } else { getCamera().setViewScale(1); } } boundCameraPosition(); double viewScale = getCamera().getViewScale(); backgroundNode.setBounds(0,0,width/viewScale,height/viewScale); // update things for(Iterator iter = regionSensitive.iterator(); iter.hasNext();) { RegionSensitive rs = (RegionSensitive)iter.next(); rs.setActiveRegion(footprint); } overlayCamera.cameraResized(new Rectangle2D.Double(0,0,width,height)); for(Iterator iter = zoomParamListeners.iterator(); iter.hasNext();) { ZoomParamListener listener = (ZoomParamListener)iter.next(); listener.zoomLevelChanged(viewScale); } }
|
public void updateConstraints() { Dimension dimension = getSize(); double width = dimension.getWidth(); double height = dimension.getHeight(); double xRatio = width / footprint.getWidth(); double yRatio = height / footprint.getHeight(); if(Math.min(xRatio,yRatio) != minZoomLevel) { minZoomLevel = Math.min(xRatio,yRatio); if(minZoomLevel < 0.05) { minZoomLevel = 0.05; } else if(minZoomLevel > 0.75) { minZoomLevel = 0.75; } for(Iterator iter = zoomParamListeners.iterator(); iter.hasNext();) { ZoomParamListener listener = (ZoomParamListener)iter.next(); listener.minZoomLevelChanged(minZoomLevel); } } // for some reason, setting setViewScale(0) screws things up // in a big way. if(scaleToShow) { if((xRatio < 1 || yRatio < 1) && (xRatio != 0 && yRatio != 0)) { double min = Math.min(xRatio,yRatio); getCamera().setViewScale(min); } else { getCamera().setViewScale(1); } } boundCameraPosition(); double viewScale = getCamera().getViewScale(); backgroundNode.setBounds(0,0,10000,10000); // update things for(Iterator iter = regionSensitive.iterator(); iter.hasNext();) { RegionSensitive rs = (RegionSensitive)iter.next(); rs.setActiveRegion(footprint); } overlayCamera.cameraResized(new Rectangle2D.Double(0,0,width,height)); for(Iterator iter = zoomParamListeners.iterator(); iter.hasNext();) { ZoomParamListener listener = (ZoomParamListener)iter.next(); listener.zoomLevelChanged(viewScale); } }
| 3,228,099
|
public TreeContextMenuController(DisplayedDocument displayedDocument) { super(displayedDocument); }
|
public TreeContextMenuController(DisplayedDocument displayedDocument) { super(displayedDocument); }
| 3,228,100
|
protected Method getMethod(String methodDescriptor) { String className = getClass().getCanonicalName(); if (!methodDescriptor.startsWith(className)) return null; int separator = className.length(); try { return getClass().getMethod(methodDescriptor.substring(separator + 1), METHOD_ARGS); } catch (NoSuchMethodException ex) { return null; } }
|
protected Method getMethod(String methodDescriptor) { String className = getClass().getCanonicalName(); if (!methodDescriptor.startsWith(className)) return null; int separator = className.length(); try { return getClass().getMethod(methodDescriptor.substring(separator + 1), METHOD_ARGS); } catch (NoSuchMethodException ex) { return null; } }
| 3,228,101
|
public static Callback getNilMethod() { return new Callback() { public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { return ruby.getNil(); } }; }
|
public static Callback getNilMethod(final int arity) { return new Callback() { public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { return ruby.getNil(); } }; }
| 3,228,103
|
public static RubyModule createComparable(Ruby ruby) { RubyModule comparableModule = ruby.defineModule("Comparable"); comparableModule.defineMethod( "==", CallbackFactory.getSingletonMethod(RubyComparable.class, "equal", RubyObject.class)); comparableModule.defineMethod(">", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_gt", RubyObject.class)); comparableModule.defineMethod( ">=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_ge", RubyObject.class)); comparableModule.defineMethod("<", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_lt", RubyObject.class)); comparableModule.defineMethod( "<=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_le", RubyObject.class)); comparableModule.defineMethod( "between?", CallbackFactory.getSingletonMethod(RubyComparable.class, "between_p", RubyObject.class, RubyObject.class)); return comparableModule; }
|
public static RubyModule createComparable(Ruby ruby) { RubyModule comparableModule = ruby.defineModule("Comparable"); comparableModule.defineMethod( "==", CallbackFactory.getSingletonMethod(RubyComparable.class, "equal", RubyObject.class)); comparableModule.defineMethod(">", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_gt", RubyObject.class)); comparableModule.defineMethod( ">=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_ge", RubyObject.class)); comparableModule.defineMethod("<", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_lt", RubyObject.class)); comparableModule.defineMethod( "<=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_le", RubyObject.class)); comparableModule.defineMethod( "between?", CallbackFactory.getSingletonMethod(RubyComparable.class, "between_p", RubyObject.class, RubyObject.class)); return comparableModule; }
| 3,228,107
|
public static RubyModule createComparable(Ruby ruby) { RubyModule comparableModule = ruby.defineModule("Comparable"); comparableModule.defineMethod( "==", CallbackFactory.getSingletonMethod(RubyComparable.class, "equal", RubyObject.class)); comparableModule.defineMethod(">", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_gt", RubyObject.class)); comparableModule.defineMethod( ">=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_ge", RubyObject.class)); comparableModule.defineMethod("<", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_lt", RubyObject.class)); comparableModule.defineMethod( "<=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_le", RubyObject.class)); comparableModule.defineMethod( "between?", CallbackFactory.getSingletonMethod(RubyComparable.class, "between_p", RubyObject.class, RubyObject.class)); return comparableModule; }
|
public static RubyModule createComparable(Ruby ruby) { RubyModule comparableModule = ruby.defineModule("Comparable"); comparableModule.defineMethod( "==", CallbackFactory.getSingletonMethod(RubyComparable.class, "equal", RubyObject.class)); comparableModule.defineMethod(">", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_gt", RubyObject.class)); comparableModule.defineMethod( ">=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_ge", RubyObject.class)); comparableModule.defineMethod("<", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_lt", RubyObject.class)); comparableModule.defineMethod( "<=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_le", RubyObject.class)); comparableModule.defineMethod( "between?", CallbackFactory.getSingletonMethod(RubyComparable.class, "between_p", RubyObject.class, RubyObject.class)); return comparableModule; }
| 3,228,108
|
public static RubyModule createComparable(Ruby ruby) { RubyModule comparableModule = ruby.defineModule("Comparable"); comparableModule.defineMethod( "==", CallbackFactory.getSingletonMethod(RubyComparable.class, "equal", RubyObject.class)); comparableModule.defineMethod(">", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_gt", RubyObject.class)); comparableModule.defineMethod( ">=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_ge", RubyObject.class)); comparableModule.defineMethod("<", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_lt", RubyObject.class)); comparableModule.defineMethod( "<=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_le", RubyObject.class)); comparableModule.defineMethod( "between?", CallbackFactory.getSingletonMethod(RubyComparable.class, "between_p", RubyObject.class, RubyObject.class)); return comparableModule; }
|
public static RubyModule createComparable(Ruby ruby) { RubyModule comparableModule = ruby.defineModule("Comparable"); comparableModule.defineMethod( "==", CallbackFactory.getSingletonMethod(RubyComparable.class, "equal", RubyObject.class)); comparableModule.defineMethod(">", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_gt", RubyObject.class)); comparableModule.defineMethod( ">=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_ge", RubyObject.class)); comparableModule.defineMethod("<", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_lt", RubyObject.class)); comparableModule.defineMethod( "<=", CallbackFactory.getSingletonMethod(RubyComparable.class, "op_le", RubyObject.class)); comparableModule.defineMethod( "between?", CallbackFactory.getSingletonMethod(RubyComparable.class, "between_p", RubyObject.class, RubyObject.class)); return comparableModule; }
| 3,228,109
|
public static RubyClass createNumericClass(Ruby ruby) { RubyClass result = ruby.defineClass("Numeric", ruby.getClasses().getObjectClass()); CallbackFactory callbackFactory = ruby.callbackFactory(); result.includeModule(ruby.getClasses().getComparableModule()); result.defineMethod("+@", callbackFactory.getMethod(RubyNumeric.class, "op_uplus")); result.defineMethod("-@", callbackFactory.getMethod(RubyNumeric.class, "op_uminus")); result.defineMethod("<=>", callbackFactory.getMethod(RubyBignum.class, "cmp", RubyNumeric.class)); result.defineMethod("==", callbackFactory.getMethod(RubyNumeric.class, "equal", IRubyObject.class)); result.defineMethod("equal?", callbackFactory.getMethod(RubyNumeric.class, "veryEqual", IRubyObject.class)); result.defineMethod("===", callbackFactory.getMethod(RubyNumeric.class, "equal", IRubyObject.class)); result.defineMethod("abs", callbackFactory.getMethod(RubyNumeric.class, "abs")); result.defineMethod("ceil", callbackFactory.getMethod(RubyNumeric.class, "ceil")); result.defineMethod("coerce", callbackFactory.getMethod(RubyNumeric.class, "coerce", RubyNumeric.class)); result.defineMethod("clone", callbackFactory.getMethod(RubyNumeric.class, "rbClone")); result.defineMethod("divmod", callbackFactory.getMethod(RubyNumeric.class, "divmod", RubyNumeric.class)); result.defineMethod("eql?", callbackFactory.getMethod(RubyNumeric.class, "eql", IRubyObject.class)); result.defineMethod("floor", callbackFactory.getMethod(RubyNumeric.class, "floor")); result.defineMethod("integer?", callbackFactory.getMethod(RubyNumeric.class, "int_p")); result.defineMethod("modulo", callbackFactory.getMethod(RubyNumeric.class, "modulo", RubyNumeric.class)); result.defineMethod("nonzero?", callbackFactory.getMethod(RubyNumeric.class, "nonzero_p")); result.defineMethod("remainder", callbackFactory.getMethod(RubyNumeric.class, "remainder", RubyNumeric.class)); result.defineMethod("round", callbackFactory.getMethod(RubyNumeric.class, "round")); result.defineMethod("truncate", callbackFactory.getMethod(RubyNumeric.class, "truncate")); result.defineMethod("zero?", callbackFactory.getMethod(RubyNumeric.class, "zero_p")); return result; }
|
public static RubyClass createNumericClass(Ruby ruby) { RubyClass result = ruby.defineClass("Numeric", ruby.getClasses().getObjectClass()); CallbackFactory callbackFactory = ruby.callbackFactory(); result.includeModule(ruby.getClasses().getComparableModule()); result.defineMethod("+@", callbackFactory.getMethod(RubyNumeric.class, "op_uplus")); result.defineMethod("-@", callbackFactory.getMethod(RubyNumeric.class, "op_uminus")); result.defineMethod("<=>", callbackFactory.getMethod(RubyNumeric.class, "cmp", RubyNumeric.class)); result.defineMethod("==", callbackFactory.getMethod(RubyNumeric.class, "equal", IRubyObject.class)); result.defineMethod("equal?", callbackFactory.getMethod(RubyNumeric.class, "veryEqual", IRubyObject.class)); result.defineMethod("===", callbackFactory.getMethod(RubyNumeric.class, "equal", IRubyObject.class)); result.defineMethod("abs", callbackFactory.getMethod(RubyNumeric.class, "abs")); result.defineMethod("ceil", callbackFactory.getMethod(RubyNumeric.class, "ceil")); result.defineMethod("coerce", callbackFactory.getMethod(RubyNumeric.class, "coerce", RubyNumeric.class)); result.defineMethod("clone", callbackFactory.getMethod(RubyNumeric.class, "rbClone")); result.defineMethod("divmod", callbackFactory.getMethod(RubyNumeric.class, "divmod", RubyNumeric.class)); result.defineMethod("eql?", callbackFactory.getMethod(RubyNumeric.class, "eql", IRubyObject.class)); result.defineMethod("floor", callbackFactory.getMethod(RubyNumeric.class, "floor")); result.defineMethod("integer?", callbackFactory.getMethod(RubyNumeric.class, "int_p")); result.defineMethod("modulo", callbackFactory.getMethod(RubyNumeric.class, "modulo", RubyNumeric.class)); result.defineMethod("nonzero?", callbackFactory.getMethod(RubyNumeric.class, "nonzero_p")); result.defineMethod("remainder", callbackFactory.getMethod(RubyNumeric.class, "remainder", RubyNumeric.class)); result.defineMethod("round", callbackFactory.getMethod(RubyNumeric.class, "round")); result.defineMethod("truncate", callbackFactory.getMethod(RubyNumeric.class, "truncate")); result.defineMethod("zero?", callbackFactory.getMethod(RubyNumeric.class, "zero_p")); return result; }
| 3,228,110
|
public static RubyClass createHashClass(Ruby ruby) { RubyClass hashClass = ruby.defineClass("Hash", ruby.getClasses().getObjectClass()); hashClass.includeModule(ruby.getClasses().getEnumerableModule()); hashClass.defineSingletonMethod("new", CallbackFactory.getOptSingletonMethod(RubyHash.class, "newInstance")); hashClass.defineSingletonMethod("[]", CallbackFactory.getOptSingletonMethod(RubyHash.class, "create")); hashClass.defineMethod("initialize", CallbackFactory.getOptMethod(RubyHash.class, "initialize")); // rb_define_method(rb_cHash,"clone", rb_hash_clone, 0); // rb_define_method(rb_cHash,"rehash", rb_hash_rehash, 0); hashClass.defineMethod("to_hash", CallbackFactory.getMethod(RubyHash.class, "to_hash")); hashClass.defineMethod("to_a", CallbackFactory.getMethod(RubyHash.class, "to_a")); hashClass.defineMethod("to_s", CallbackFactory.getMethod(RubyHash.class, "to_s")); hashClass.defineMethod("inspect", CallbackFactory.getMethod(RubyHash.class, "inspect")); hashClass.defineMethod("==", CallbackFactory.getMethod(RubyHash.class, "equal", RubyObject.class)); hashClass.defineMethod("[]", CallbackFactory.getMethod(RubyHash.class, "aref", RubyObject.class)); // rb_define_method(rb_cHash,"fetch", rb_hash_fetch, -1); hashClass.defineMethod("[]=", CallbackFactory.getMethod(RubyHash.class, "aset", RubyObject.class, RubyObject.class)); hashClass.defineMethod("store", CallbackFactory.getMethod(RubyHash.class, "aset", RubyObject.class, RubyObject.class)); // rb_define_method(rb_cHash,"default", rb_hash_default, 0); // rb_define_method(rb_cHash,"default=", rb_hash_set_default, 1); // rb_define_method(rb_cHash,"index", rb_hash_index, 1); hashClass.defineMethod("indexes", CallbackFactory.getOptMethod(RubyHash.class, "indexes")); hashClass.defineMethod("indices", CallbackFactory.getOptMethod(RubyHash.class, "indexes")); hashClass.defineMethod("size", CallbackFactory.getMethod(RubyHash.class, "size")); hashClass.defineMethod("length", CallbackFactory.getMethod(RubyHash.class, "size")); hashClass.defineMethod("empty?", CallbackFactory.getMethod(RubyHash.class, "empty_p")); hashClass.defineMethod("each", CallbackFactory.getMethod(RubyHash.class, "each")); hashClass.defineMethod("each_pair", CallbackFactory.getMethod(RubyHash.class, "each")); // rb_define_method(rb_cHash,"each", rb_hash_each_pair, 0); // rb_define_method(rb_cHash,"each_value", rb_hash_each_value, 0); // rb_define_method(rb_cHash,"each_key", rb_hash_each_key, 0); // rb_define_method(rb_cHash,"each_pair", rb_hash_each_pair, 0); // rb_define_method(rb_cHash,"sort", rb_hash_sort, 0); hashClass.defineMethod("keys", CallbackFactory.getMethod(RubyHash.class, "keys")); hashClass.defineMethod("values", CallbackFactory.getMethod(RubyHash.class, "values")); // rb_define_method(rb_cHash,"shift", rb_hash_shift, 0); // rb_define_method(rb_cHash,"delete", rb_hash_delete, 1); // rb_define_method(rb_cHash,"delete_if", rb_hash_delete_if, 0); // rb_define_method(rb_cHash,"reject", rb_hash_reject, 0); // rb_define_method(rb_cHash,"reject!", rb_hash_reject_bang, 0); // rb_define_method(rb_cHash,"clear", rb_hash_clear, 0); // rb_define_method(rb_cHash,"invert", rb_hash_invert, 0); // rb_define_method(rb_cHash,"update", rb_hash_update, 1); // rb_define_method(rb_cHash,"replace", rb_hash_replace, 1); hashClass.defineMethod("include?", CallbackFactory.getMethod(RubyHash.class, "has_key", RubyObject.class)); hashClass.defineMethod("member?", CallbackFactory.getMethod(RubyHash.class, "has_key", RubyObject.class)); hashClass.defineMethod("has_key?", CallbackFactory.getMethod(RubyHash.class, "has_key", RubyObject.class)); hashClass.defineMethod("has_value?", CallbackFactory.getMethod(RubyHash.class, "has_value", RubyObject.class)); hashClass.defineMethod("key?", CallbackFactory.getMethod(RubyHash.class, "has_key", RubyObject.class)); hashClass.defineMethod("value?", CallbackFactory.getMethod(RubyHash.class, "has_value", RubyObject.class)); return hashClass; }
|
hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); publichashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); statichashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyClasshashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); createHashClass(RubyhashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); ruby)hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); {hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyClasshashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClasshashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); =hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); ruby.defineClass("Hash",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); ruby.getClasses().getObjectClass());hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.includeModule(ruby.getClasses().getEnumerableModule());hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineSingletonMethod("new",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getOptSingletonMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "newInstance"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineSingletonMethod("[]",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getOptSingletonMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "create"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("initialize",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getOptMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "initialize"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"clone",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_clone,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"rehash",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_rehash,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("to_hash",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "to_hash"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("to_a",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "to_a"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("to_s",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "to_s"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("inspect",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "inspect"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("==",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "equal",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("[]",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "aref",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"fetch",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_fetch,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); -1);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("[]=",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "aset",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("store",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "aset",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"default",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_default,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"default=",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_set_default,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 1);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"index",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_index,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 1);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("indexes",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getOptMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "indexes"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("indices",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getOptMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "indexes"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("size",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "size"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("length",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "size"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("empty?",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "empty_p")); hashClass.defineMethod("each",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "each")); hashClass.defineMethod("each_pair",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "each"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"each",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_each_pair,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"each_value",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_each_value,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"each_key",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_each_key,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"each_pair",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_each_pair,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"sort",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_sort,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0); hashClass.defineMethod("keys",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "keys")); hashClass.defineMethod("values",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "values"));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"shift",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_shift,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"delete",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_delete,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 1);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"delete_if",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_delete_if,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"reject",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_reject,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"reject!",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_reject_bang,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"clear",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_clear,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"invert",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_invert,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 0);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"update",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_update,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 1);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); //hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_define_method(rb_cHash,"replace",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); rb_hash_replace,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); 1);hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("include?",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "has_key",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("member?",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "has_key",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("has_key?",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "has_key",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("has_value?",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "has_value",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("key?",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "has_key",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("value?",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); CallbackFactory.getMethod(RubyHash.class,hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); "has_value",hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); RubyObject.class));hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); returnhashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass;hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); hashClass.defineMethod("shift", CallbackFactory.getMethod(RubyHash.class, "shift")); }
| 3,228,111
|
public static RubyClass createIOClass(Ruby ruby) { RubyClass result = ruby.defineClass("IO", ruby.getClasses().getObjectClass()); result.includeModule(ruby.getClasses().getClass("Enumerable")); // TODO: Implement tty? and isatty. We have no real capability to // determine this from java, but if we could set tty status, then // we could invoke jruby differently to allow stdin to return true // on this. This would allow things like cgi.rb to work properly. CallbackFactory callbackFactory = ruby.callbackFactory(); result.defineMethod("<<", callbackFactory.getMethod(RubyIO.class, "addString", IRubyObject.class)); result.defineMethod("clone", callbackFactory.getMethod(RubyIO.class, "clone_IO")); result.defineMethod("close", callbackFactory.getMethod(RubyIO.class, "close")); result.defineMethod("closed?", callbackFactory.getMethod(RubyIO.class, "closed")); result.defineMethod("each", callbackFactory.getOptMethod(RubyIO.class, "each_line")); result.defineMethod("each_byte", callbackFactory.getMethod(RubyIO.class, "each_byte")); result.defineMethod("each_line", callbackFactory.getOptMethod(RubyIO.class, "each_line")); result.defineMethod("eof", callbackFactory.getMethod(RubyIO.class, "eof")); result.defineMethod("eof?", callbackFactory.getMethod(RubyIO.class, "eof")); result.defineMethod("fileno", callbackFactory.getMethod(RubyIO.class, "fileno")); result.defineMethod("flush", callbackFactory.getMethod(RubyIO.class, "flush")); result.defineMethod("fsync", callbackFactory.getMethod(RubyIO.class, "fsync")); result.defineMethod("getc", callbackFactory.getMethod(RubyIO.class, "getc")); result.defineMethod("gets", callbackFactory.getOptMethod(RubyIO.class, "gets")); result.defineMethod("initialize", callbackFactory.getOptMethod(RubyIO.class, "initialize", RubyFixnum.class)); result.defineMethod("lineno", callbackFactory.getMethod(RubyIO.class, "lineno")); result.defineMethod("lineno=", callbackFactory.getMethod(RubyIO.class, "lineno_set", RubyFixnum.class)); result.defineMethod("pid", callbackFactory.getMethod(RubyIO.class, "pid")); result.defineMethod("pos", callbackFactory.getMethod(RubyIO.class, "pos")); result.defineMethod("pos=", callbackFactory.getMethod(RubyIO.class, "pos_set", RubyFixnum.class)); result.defineMethod("print", callbackFactory.getOptSingletonMethod(RubyIO.class, "print")); result.defineMethod("printf", callbackFactory.getOptSingletonMethod(RubyIO.class, "printf")); result.defineMethod("putc", callbackFactory.getMethod(RubyIO.class, "putc", IRubyObject.class)); result.defineMethod("puts", callbackFactory.getOptSingletonMethod(RubyIO.class, "puts")); result.defineMethod("read", callbackFactory.getOptMethod(RubyIO.class, "read")); result.defineMethod("readchar", callbackFactory.getMethod(RubyIO.class, "readchar")); result.defineMethod("readline", callbackFactory.getOptMethod(RubyIO.class, "readline")); result.defineMethod("readlines", callbackFactory.getOptMethod(RubyIO.class, "readlines")); result.defineMethod("reopen", callbackFactory.getOptMethod(RubyIO.class, "reopen", IRubyObject.class)); result.defineMethod("rewind", callbackFactory.getMethod(RubyIO.class, "rewind")); result.defineMethod("seek", callbackFactory.getOptMethod(RubyIO.class, "seek")); result.defineMethod("sync", callbackFactory.getMethod(RubyIO.class, "sync")); result.defineMethod("sync=", callbackFactory.getMethod(RubyIO.class, "sync_set", RubyBoolean.class)); result.defineMethod("sysread", callbackFactory.getMethod(RubyIO.class, "sysread", RubyFixnum.class)); result.defineMethod("syswrite", callbackFactory.getMethod(RubyIO.class, "syswrite", IRubyObject.class)); result.defineMethod("tell", callbackFactory.getMethod(RubyIO.class, "pos")); result.defineMethod("to_i", callbackFactory.getMethod(RubyIO.class, "fileno")); result.defineMethod("ungetc", callbackFactory.getMethod(RubyIO.class, "ungetc", RubyFixnum.class)); result.defineMethod("write", callbackFactory.getMethod(RubyIO.class, "write", IRubyObject.class)); result.defineSingletonMethod("new", callbackFactory.getOptSingletonMethod(RubyIO.class, "newInstance")); result.defineSingletonMethod("foreach", callbackFactory.getOptSingletonMethod(RubyIO.class, "foreach", IRubyObject.class)); result.defineSingletonMethod("readlines", callbackFactory.getOptSingletonMethod(RubyIO.class, "readlines")); // Constants for seek result.setConstant("SEEK_SET", RubyFixnum.newFixnum(ruby, IOHandler.SEEK_SET)); result.setConstant("SEEK_CUR", RubyFixnum.newFixnum(ruby, IOHandler.SEEK_CUR)); result.setConstant("SEEK_END", RubyFixnum.newFixnum(ruby, IOHandler.SEEK_END)); return result; }
|
public static RubyClass createIOClass(Ruby ruby) { RubyClass result = ruby.defineClass("IO", ruby.getClasses().getObjectClass()); result.includeModule(ruby.getClasses().getEnumerableModule()); // TODO: Implement tty? and isatty. We have no real capability to // determine this from java, but if we could set tty status, then // we could invoke jruby differently to allow stdin to return true // on this. This would allow things like cgi.rb to work properly. CallbackFactory callbackFactory = ruby.callbackFactory(); result.defineMethod("<<", callbackFactory.getMethod(RubyIO.class, "addString", IRubyObject.class)); result.defineMethod("clone", callbackFactory.getMethod(RubyIO.class, "clone_IO")); result.defineMethod("close", callbackFactory.getMethod(RubyIO.class, "close")); result.defineMethod("closed?", callbackFactory.getMethod(RubyIO.class, "closed")); result.defineMethod("each", callbackFactory.getOptMethod(RubyIO.class, "each_line")); result.defineMethod("each_byte", callbackFactory.getMethod(RubyIO.class, "each_byte")); result.defineMethod("each_line", callbackFactory.getOptMethod(RubyIO.class, "each_line")); result.defineMethod("eof", callbackFactory.getMethod(RubyIO.class, "eof")); result.defineMethod("eof?", callbackFactory.getMethod(RubyIO.class, "eof")); result.defineMethod("fileno", callbackFactory.getMethod(RubyIO.class, "fileno")); result.defineMethod("flush", callbackFactory.getMethod(RubyIO.class, "flush")); result.defineMethod("fsync", callbackFactory.getMethod(RubyIO.class, "fsync")); result.defineMethod("getc", callbackFactory.getMethod(RubyIO.class, "getc")); result.defineMethod("gets", callbackFactory.getOptMethod(RubyIO.class, "gets")); result.defineMethod("initialize", callbackFactory.getOptMethod(RubyIO.class, "initialize", RubyFixnum.class)); result.defineMethod("lineno", callbackFactory.getMethod(RubyIO.class, "lineno")); result.defineMethod("lineno=", callbackFactory.getMethod(RubyIO.class, "lineno_set", RubyFixnum.class)); result.defineMethod("pid", callbackFactory.getMethod(RubyIO.class, "pid")); result.defineMethod("pos", callbackFactory.getMethod(RubyIO.class, "pos")); result.defineMethod("pos=", callbackFactory.getMethod(RubyIO.class, "pos_set", RubyFixnum.class)); result.defineMethod("print", callbackFactory.getOptSingletonMethod(RubyIO.class, "print")); result.defineMethod("printf", callbackFactory.getOptSingletonMethod(RubyIO.class, "printf")); result.defineMethod("putc", callbackFactory.getMethod(RubyIO.class, "putc", IRubyObject.class)); result.defineMethod("puts", callbackFactory.getOptSingletonMethod(RubyIO.class, "puts")); result.defineMethod("read", callbackFactory.getOptMethod(RubyIO.class, "read")); result.defineMethod("readchar", callbackFactory.getMethod(RubyIO.class, "readchar")); result.defineMethod("readline", callbackFactory.getOptMethod(RubyIO.class, "readline")); result.defineMethod("readlines", callbackFactory.getOptMethod(RubyIO.class, "readlines")); result.defineMethod("reopen", callbackFactory.getOptMethod(RubyIO.class, "reopen", IRubyObject.class)); result.defineMethod("rewind", callbackFactory.getMethod(RubyIO.class, "rewind")); result.defineMethod("seek", callbackFactory.getOptMethod(RubyIO.class, "seek")); result.defineMethod("sync", callbackFactory.getMethod(RubyIO.class, "sync")); result.defineMethod("sync=", callbackFactory.getMethod(RubyIO.class, "sync_set", RubyBoolean.class)); result.defineMethod("sysread", callbackFactory.getMethod(RubyIO.class, "sysread", RubyFixnum.class)); result.defineMethod("syswrite", callbackFactory.getMethod(RubyIO.class, "syswrite", IRubyObject.class)); result.defineMethod("tell", callbackFactory.getMethod(RubyIO.class, "pos")); result.defineMethod("to_i", callbackFactory.getMethod(RubyIO.class, "fileno")); result.defineMethod("ungetc", callbackFactory.getMethod(RubyIO.class, "ungetc", RubyFixnum.class)); result.defineMethod("write", callbackFactory.getMethod(RubyIO.class, "write", IRubyObject.class)); result.defineSingletonMethod("new", callbackFactory.getOptSingletonMethod(RubyIO.class, "newInstance")); result.defineSingletonMethod("foreach", callbackFactory.getOptSingletonMethod(RubyIO.class, "foreach", IRubyObject.class)); result.defineSingletonMethod("readlines", callbackFactory.getOptSingletonMethod(RubyIO.class, "readlines")); // Constants for seek result.setConstant("SEEK_SET", RubyFixnum.newFixnum(ruby, IOHandler.SEEK_SET)); result.setConstant("SEEK_CUR", RubyFixnum.newFixnum(ruby, IOHandler.SEEK_CUR)); result.setConstant("SEEK_END", RubyFixnum.newFixnum(ruby, IOHandler.SEEK_END)); return result; }
| 3,228,113
|
public static RubyClass createMethodClass(Ruby ruby) { RubyCallbackMethod arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); RubyCallbackMethod call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; }
|
public static RubyClass createMethodClass(Ruby ruby) { RubyCallbackMethod arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); RubyCallbackMethod call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; }
| 3,228,114
|
public static RubyClass createMethodClass(Ruby ruby) { RubyCallbackMethod arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); RubyCallbackMethod call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; }
|
public static RubyClass createMethodClass(Ruby ruby) { RubyCallbackMethod arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); RubyCallbackMethod call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; }
| 3,228,115
|
public static RubyClass createMethodClass(Ruby ruby) { RubyCallbackMethod arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); RubyCallbackMethod call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; }
|
public static RubyClass createMethodClass(Ruby ruby) { RubyCallbackMethod arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); RubyCallbackMethod call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; }
| 3,228,116
|
public static RubyClass createMethodClass(Ruby ruby) { RubyCallbackMethod arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); RubyCallbackMethod call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; }
|
public static RubyClass createMethodClass(Ruby ruby) { RubyCallbackMethod arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); RubyCallbackMethod call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; }
| 3,228,117
|
public static RubyModule createObjectSpaceModule(Ruby ruby) { RubyCallbackMethod each_object = new ReflectionCallbackMethod(RubyObjectSpace.class, "each_object", true, true); RubyModule objectSpaceModule = ruby.defineModule("ObjectSpace"); objectSpaceModule.defineModuleFunction("each_object", each_object); return objectSpaceModule; }
|
public static RubyModule createObjectSpaceModule(Ruby ruby) { RubyCallbackMethod each_object = new ReflectionCallbackMethod(RubyObjectSpace.class, "each_object", true, true); RubyModule objectSpaceModule = ruby.defineModule("ObjectSpace"); objectSpaceModule.defineModuleFunction("each_object", each_object); return objectSpaceModule; }
| 3,228,118
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.