repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
maruohon/justenoughdimensions
src/main/java/fi/dy/masa/justenoughdimensions/network/PacketHandler.java
// Path: src/main/java/fi/dy/masa/justenoughdimensions/reference/Reference.java // public class Reference // { // public static final String MOD_ID = "justenoughdimensions"; // public static final String MOD_NAME = "Just Enough Dimensions"; // public static final String MOD_VERSION = "@MOD_VERSION@"; // ...
import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; import net.minecraftforge.fml.relauncher.Side; import fi.dy.masa.justenoughdimensions.reference.Reference;
package fi.dy.masa.justenoughdimensions.network; public class PacketHandler {
// Path: src/main/java/fi/dy/masa/justenoughdimensions/reference/Reference.java // public class Reference // { // public static final String MOD_ID = "justenoughdimensions"; // public static final String MOD_NAME = "Just Enough Dimensions"; // public static final String MOD_VERSION = "@MOD_VERSION@"; // ...
public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(Reference.MOD_ID.toLowerCase());
maruohon/justenoughdimensions
src/main/java/fi/dy/masa/justenoughdimensions/config/JustEnoughDimensionsGuiFactory.java
// Path: src/main/java/fi/dy/masa/justenoughdimensions/reference/Reference.java // public class Reference // { // public static final String MOD_ID = "justenoughdimensions"; // public static final String MOD_NAME = "Just Enough Dimensions"; // public static final String MOD_VERSION = "@MOD_VERSION@"; // ...
import java.util.ArrayList; import java.util.List; import net.minecraft.client.gui.GuiScreen; import net.minecraftforge.common.config.ConfigElement; import net.minecraftforge.fml.client.DefaultGuiFactory; import net.minecraftforge.fml.client.config.GuiConfig; import net.minecraftforge.fml.client.config.IConfigElement; ...
package fi.dy.masa.justenoughdimensions.config; public class JustEnoughDimensionsGuiFactory extends DefaultGuiFactory { public JustEnoughDimensionsGuiFactory() {
// Path: src/main/java/fi/dy/masa/justenoughdimensions/reference/Reference.java // public class Reference // { // public static final String MOD_ID = "justenoughdimensions"; // public static final String MOD_NAME = "Just Enough Dimensions"; // public static final String MOD_VERSION = "@MOD_VERSION@"; // ...
super(Reference.MOD_ID, getTitle());
datenhahn/componentrenderer
componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/DetailsKeysExtension.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/client/detailskeys/DetailsOpenCloseServerRpc.java // public interface DetailsOpenCloseServerRpc extends ServerRpc { // // /** // * Sets the details of a row visible or hidden. // * // * @param rowIndex the rowIndex of the...
import com.vaadin.v7.ui.Grid; import de.datenhahn.vaadin.componentrenderer.client.detailskeys.DetailsOpenCloseServerRpc;
/** * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under t...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/client/detailskeys/DetailsOpenCloseServerRpc.java // public interface DetailsOpenCloseServerRpc extends ServerRpc { // // /** // * Sets the details of a row visible or hidden. // * // * @param rowIndex the rowIndex of the...
public static class DetailsOpenCloseServerRpcImpl implements DetailsOpenCloseServerRpc {
datenhahn/componentrenderer
componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGrid.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/FocusPreserveExtension.java // public class FocusPreserveExtension extends Grid.AbstractGridExtension { // private final FocusPreservingRefreshClientRpc focusRpc = getRpcProxy(FocusPreservingRefreshClientRpc.class); // // private Fo...
import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.v7.ui.Grid; import de.datenhahn.vaadin.componentrenderer.FocusPreserveExtension; import de.datenhahn.vaadin.componentrenderer.grid.header.ComponentHeaderGenerator; import de.datenhahn.vaadin.co...
/** * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under t...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/FocusPreserveExtension.java // public class FocusPreserveExtension extends Grid.AbstractGridExtension { // private final FocusPreservingRefreshClientRpc focusRpc = getRpcProxy(FocusPreservingRefreshClientRpc.class); // // private Fo...
public FocusPreserveExtension getFocusPreserveExtension() {
datenhahn/componentrenderer
componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGrid.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/FocusPreserveExtension.java // public class FocusPreserveExtension extends Grid.AbstractGridExtension { // private final FocusPreservingRefreshClientRpc focusRpc = getRpcProxy(FocusPreservingRefreshClientRpc.class); // // private Fo...
import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.v7.ui.Grid; import de.datenhahn.vaadin.componentrenderer.FocusPreserveExtension; import de.datenhahn.vaadin.componentrenderer.grid.header.ComponentHeaderGenerator; import de.datenhahn.vaadin.co...
public Grid.Column addComponentColumn(Object propertyId, ComponentGenerator<T> generator) { return componentGridDecorator.addComponentColumn(propertyId, generator); } /** * Refreshes the grid preserving its current cell focus. */ public ComponentGrid<T> refresh() { component...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/FocusPreserveExtension.java // public class FocusPreserveExtension extends Grid.AbstractGridExtension { // private final FocusPreservingRefreshClientRpc focusRpc = getRpcProxy(FocusPreservingRefreshClientRpc.class); // // private Fo...
public ComponentGrid<T> generateHeaders(ComponentHeaderGenerator generator) {
datenhahn/componentrenderer
componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGrid.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/FocusPreserveExtension.java // public class FocusPreserveExtension extends Grid.AbstractGridExtension { // private final FocusPreservingRefreshClientRpc focusRpc = getRpcProxy(FocusPreservingRefreshClientRpc.class); // // private Fo...
import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.v7.ui.Grid; import de.datenhahn.vaadin.componentrenderer.FocusPreserveExtension; import de.datenhahn.vaadin.componentrenderer.grid.header.ComponentHeaderGenerator; import de.datenhahn.vaadin.co...
/** * Remove all items from the underlying {@link BeanItemContainer} and add * the new beans. * * @param beans a collection of beans * @return the grid for method chaining */ public ComponentGrid<T> setRows(Collection<T> beans) { componentGridDecorator.setRows(beans); ...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/FocusPreserveExtension.java // public class FocusPreserveExtension extends Grid.AbstractGridExtension { // private final FocusPreservingRefreshClientRpc focusRpc = getRpcProxy(FocusPreservingRefreshClientRpc.class); // // private Fo...
public ComponentGrid<T> generateHeaders(TextHeaderGenerator generator) {
datenhahn/componentrenderer
componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGrid.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/FocusPreserveExtension.java // public class FocusPreserveExtension extends Grid.AbstractGridExtension { // private final FocusPreservingRefreshClientRpc focusRpc = getRpcProxy(FocusPreservingRefreshClientRpc.class); // // private Fo...
import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.v7.ui.Grid; import de.datenhahn.vaadin.componentrenderer.FocusPreserveExtension; import de.datenhahn.vaadin.componentrenderer.grid.header.ComponentHeaderGenerator; import de.datenhahn.vaadin.co...
* Generates component header fields using the passed {@link ComponentHeaderGenerator} and * sets them to the columns. * * @param generator the header generator * @return the grid for method chaining */ public ComponentGrid<T> generateHeaders(ComponentHeaderGenerator generator) { ...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/FocusPreserveExtension.java // public class FocusPreserveExtension extends Grid.AbstractGridExtension { // private final FocusPreservingRefreshClientRpc focusRpc = getRpcProxy(FocusPreservingRefreshClientRpc.class); // // private Fo...
public ComponentGrid<T> generateHeaders(HtmlHeaderGenerator generator) {
datenhahn/componentrenderer
componentrenderer-demo/src/main/java/de/datenhahn/vaadin/componentrenderer/demo/TestbenchCachingGridTab.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGenerator.java // public interface ComponentGenerator<T> extends Serializable { // // /** // * Called to generate the component for a component cell based // * on the passed typed bean. // * // * @param...
import com.vaadin.server.Sizeable; import com.vaadin.ui.Component; import com.vaadin.ui.TabSheet; import com.vaadin.v7.ui.ComboBox; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.VerticalLayout; import de.datenhahn.vaadin.componentrenderer.grid.ComponentGenerator; import de.datenhahn.vaadin.componentrenderer.gri...
/* * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under th...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGenerator.java // public interface ComponentGenerator<T> extends Serializable { // // /** // * Called to generate the component for a component cell based // * on the passed typed bean. // * // * @param...
class TestComponentGenerator implements ComponentGenerator<Customer> {
datenhahn/componentrenderer
componentrenderer-demo/src/main/java/de/datenhahn/vaadin/componentrenderer/demo/TestbenchCachingGridTab.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGenerator.java // public interface ComponentGenerator<T> extends Serializable { // // /** // * Called to generate the component for a component cell based // * on the passed typed bean. // * // * @param...
import com.vaadin.server.Sizeable; import com.vaadin.ui.Component; import com.vaadin.ui.TabSheet; import com.vaadin.v7.ui.ComboBox; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.VerticalLayout; import de.datenhahn.vaadin.componentrenderer.grid.ComponentGenerator; import de.datenhahn.vaadin.componentrenderer.gri...
return comboBox; } private ComboBox create(final Customer data) { final ComboBox comboBox = new ComboBox(); comboBox.setWidth(150, Sizeable.Unit.PIXELS); comboBox.setHeight(50, Sizeable.Unit.PIXELS); comboBox.addItems(Customer.Food.FISH, Custo...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGenerator.java // public interface ComponentGenerator<T> extends Serializable { // // /** // * Called to generate the component for a component cell based // * on the passed typed bean. // * // * @param...
ComponentGrid<Customer> grid = new ComponentGrid<>(Customer.class);
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/testbench/MemoryIT.java
// Path: componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/testbench/util/JmxMemoryUtil.java // public class JmxMemoryUtil { // private ObjectName memory; // private MBeanServerConnection remote; // private JMXServiceURL target; // // public JmxMemoryUtil() throws IOException, Attac...
import com.vaadin.testbench.elements.GridElement; import de.datenhahn.vaadin.componentrenderer.testbench.util.JmxMemoryUtil; import org.apache.commons.lang3.time.StopWatch; import org.junit.Test; import java.io.IOException; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.lessTha...
System.out.println(" BATCH_SIZE: " + BATCH_SIZE); setupOperaDriver(); getDriver().get("http://localhost:8080/testbench"); runMemoryTest(); } public void profileInternetExplorer() throws InterruptedException, IOException { System.out.println("\n\n=== Test Internet Expl...
// Path: componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/testbench/util/JmxMemoryUtil.java // public class JmxMemoryUtil { // private ObjectName memory; // private MBeanServerConnection remote; // private JMXServiceURL target; // // public JmxMemoryUtil() throws IOException, Attac...
JmxMemoryUtil jmxMemoryUtil = new JmxMemoryUtil();
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.ComponentCellKeyExtension; import de.datenhahn.vaadin.c...
/* * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under th...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
assertTrue(containsExtension(grid, FocusPreserveExtension.class));
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.ComponentCellKeyExtension; import de.datenhahn.vaadin.c...
/* * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under th...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
assertTrue(containsExtension(grid, DetailsKeysExtension.class));
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.ComponentCellKeyExtension; import de.datenhahn.vaadin.c...
/* * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under th...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
assertTrue(containsExtension(grid, ComponentCellKeyExtension.class));
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.ComponentCellKeyExtension; import de.datenhahn.vaadin.c...
assertThat(grid.getContainerDataSource().getItemIds().size(), is(10)); List<ExampleBean> moreBeans = new ArrayList<>(); for(int i = 10; i < 20;i++) { ExampleBean bean = new ExampleBean(); bean.setCaption("foo" +i); bean.setIsSomething(true); moreB...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
grid.generateHeaders(new TextHeaderGenerator() {
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.ComponentCellKeyExtension; import de.datenhahn.vaadin.c...
// just check that no exception fly grid.refresh(); } @Test public void testGenerateTextHeaders() { ComponentGrid grid = createTestGrid(); String headerText = grid.getDefaultHeaderRow().getCell(COLUMN_CAPTION).getText(); assertThat(headerText, is("Caption")); ...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
grid.generateHeaders(new HtmlHeaderGenerator() {
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.ComponentCellKeyExtension; import de.datenhahn.vaadin.c...
headerText = grid.getDefaultHeaderRow().getCell(COLUMN_CAPTION).getText(); assertThat(headerText, is("TEXT:caption")); } @Test public void testGenerateHtmlHeaders() { ComponentGrid grid = createTestGrid(); String headerText = grid.getDefaultHeaderRow().getCell(COLUMN_CAPTI...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
grid.generateHeaders(new ComponentHeaderGenerator() {
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridDecoratorTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.Compo...
/* * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under th...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
assertFalse(containsExtension(grid, FocusPreserveExtension.class));
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridDecoratorTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.Compo...
/* * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under th...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
assertFalse(containsExtension(grid, DetailsKeysExtension.class));
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridDecoratorTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.Compo...
/* * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under th...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
assertFalse(containsExtension(grid, ComponentCellKeyExtension.class));
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridDecoratorTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.Compo...
Object firstBean = grid.getContainerDataSource().getIdByIndex(0); assertThat(grid.getContainerDataSource().getItemIds().size(), is(10)); assertThat(grid.getContainerDataSource().getItemIds().contains(firstBean), is(true)); decorator.remove((ExampleBean)firstBean); assertThat(gri...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
decorator.generateHeaders(new TextHeaderGenerator() {
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridDecoratorTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.Compo...
decorator.refresh(); } @Test public void testGenerateTextHeaders() { Grid grid = createTestGrid(); ComponentGridDecorator<ExampleBean> decorator = new ComponentGridDecorator<>(grid, ExampleBean.class); String headerText = grid.getDefaultHeaderRow().getCell(COLUMN_CAPTION).g...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
decorator.generateHeaders(new HtmlHeaderGenerator() {
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGridDecoratorTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
import com.vaadin.v7.data.Item; import com.vaadin.v7.data.util.BeanItemContainer; import com.vaadin.v7.data.util.GeneratedPropertyContainer; import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.Compo...
assertThat(headerText, is("TEXT:caption")); } @Test public void testGenerateHtmlHeaders() { Grid grid = createTestGrid(); ComponentGridDecorator<ExampleBean> decorator = new ComponentGridDecorator<>(grid, ExampleBean.class); String headerText = grid.getDefaultHeaderRow().ge...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/ComponentCellKeyExtension.java // public class ComponentCellKeyExtension extends Grid.AbstractGridExtension { // // private ComponentCellKeyExtension(final Grid grid) { // super.extend(grid); // } // // public static Co...
decorator.generateHeaders(new ComponentHeaderGenerator() {
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/ComponentRendererTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGenerator.java // public interface ComponentGenerator<T> extends Serializable { // // /** // * Called to generate the component for a component cell based // * on the passed typed bean. // * // * @param...
import com.vaadin.ui.Component; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.grid.ComponentGenerator; import de.datenhahn.vaadin.componentrenderer.grid.ComponentGrid; import de.datenhahn.vaadin.componentrenderer.grid.ExampleBean; import elemental.json.Json; import elemental.json.JsonValue...
package de.datenhahn.vaadin.componentrenderer; public class ComponentRendererTest { @Test public void encodeNullComponent() { ComponentRenderer renderer = new ComponentRenderer(); assertThat(renderer.encode(null), equalTo((JsonValue) Json.createNull())); } @Test(expected = IllegalSt...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGenerator.java // public interface ComponentGenerator<T> extends Serializable { // // /** // * Called to generate the component for a component cell based // * on the passed typed bean. // * // * @param...
ComponentGrid<ExampleBean> grid = new ComponentGrid<>(ExampleBean.class);
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/ComponentRendererTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGenerator.java // public interface ComponentGenerator<T> extends Serializable { // // /** // * Called to generate the component for a component cell based // * on the passed typed bean. // * // * @param...
import com.vaadin.ui.Component; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.grid.ComponentGenerator; import de.datenhahn.vaadin.componentrenderer.grid.ComponentGrid; import de.datenhahn.vaadin.componentrenderer.grid.ExampleBean; import elemental.json.Json; import elemental.json.JsonValue...
package de.datenhahn.vaadin.componentrenderer; public class ComponentRendererTest { @Test public void encodeNullComponent() { ComponentRenderer renderer = new ComponentRenderer(); assertThat(renderer.encode(null), equalTo((JsonValue) Json.createNull())); } @Test(expected = IllegalSt...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGenerator.java // public interface ComponentGenerator<T> extends Serializable { // // /** // * Called to generate the component for a component cell based // * on the passed typed bean. // * // * @param...
ComponentGrid<ExampleBean> grid = new ComponentGrid<>(ExampleBean.class);
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/ComponentRendererTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGenerator.java // public interface ComponentGenerator<T> extends Serializable { // // /** // * Called to generate the component for a component cell based // * on the passed typed bean. // * // * @param...
import com.vaadin.ui.Component; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.grid.ComponentGenerator; import de.datenhahn.vaadin.componentrenderer.grid.ComponentGrid; import de.datenhahn.vaadin.componentrenderer.grid.ExampleBean; import elemental.json.Json; import elemental.json.JsonValue...
package de.datenhahn.vaadin.componentrenderer; public class ComponentRendererTest { @Test public void encodeNullComponent() { ComponentRenderer renderer = new ComponentRenderer(); assertThat(renderer.encode(null), equalTo((JsonValue) Json.createNull())); } @Test(expected = IllegalSt...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGenerator.java // public interface ComponentGenerator<T> extends Serializable { // // /** // * Called to generate the component for a component cell based // * on the passed typed bean. // * // * @param...
grid.addComponentColumn("caption", new ComponentGenerator<ExampleBean>() {
datenhahn/componentrenderer
componentrenderer-demo/src/main/java/de/datenhahn/vaadin/componentrenderer/demo/TestbenchComponentGridTab.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGrid.java // public class ComponentGrid<T> extends Grid { // // private final ComponentGridDecorator<T> componentGridDecorator; // // public ComponentGrid(Class<T> typeOfRows) { // super(); // setConta...
import de.datenhahn.vaadin.componentrenderer.grid.ComponentGrid; import com.vaadin.ui.Button; import com.vaadin.v7.ui.Label; import com.vaadin.v7.ui.VerticalLayout;
/* * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under th...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGrid.java // public class ComponentGrid<T> extends Grid { // // private final ComponentGridDecorator<T> componentGridDecorator; // // public ComponentGrid(Class<T> typeOfRows) { // super(); // setConta...
ComponentGrid<Customer> grid = new ComponentGrid<>(Customer.class);
datenhahn/componentrenderer
componentrenderer-demo/src/main/java/de/datenhahn/vaadin/componentrenderer/demo/ComponentGridTab.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGrid.java // public class ComponentGrid<T> extends Grid { // // private final ComponentGridDecorator<T> componentGridDecorator; // // public ComponentGrid(Class<T> typeOfRows) { // super(); // setConta...
import com.vaadin.v7.ui.VerticalLayout; import de.datenhahn.vaadin.componentrenderer.grid.ComponentGrid; import com.vaadin.v7.ui.Label;
/** * Licensed under the Apache License,Version2.0(the"License");you may not * use this file except in compliance with the License.You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,software * distributed under t...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGrid.java // public class ComponentGrid<T> extends Grid { // // private final ComponentGridDecorator<T> componentGridDecorator; // // public ComponentGrid(Class<T> typeOfRows) { // super(); // setConta...
ComponentGrid<Customer> grid = new ComponentGrid<>(Customer.class);
datenhahn/componentrenderer
componentrenderer/src/test/java/de/datenhahn/vaadin/componentrenderer/DetailsKeysExtensionTest.java
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/client/detailskeys/DetailsOpenCloseServerRpc.java // public interface DetailsOpenCloseServerRpc extends ServerRpc { // // /** // * Sets the details of a row visible or hidden. // * // * @param rowIndex the rowIndex of the...
import com.vaadin.server.Extension; import com.vaadin.ui.Component; import com.vaadin.v7.ui.Grid; import com.vaadin.v7.ui.Label; import de.datenhahn.vaadin.componentrenderer.client.detailskeys.DetailsOpenCloseServerRpc; import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.as...
assertFalse(grid.isDetailsVisible(id)); } private Grid createTestGrid() { Grid grid = new Grid(); grid.addColumn("rows"); grid.setDetailsGenerator(new Grid.DetailsGenerator() { @Override public Component getDetails(Grid.RowReference rowReference) { ...
// Path: componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/client/detailskeys/DetailsOpenCloseServerRpc.java // public interface DetailsOpenCloseServerRpc extends ServerRpc { // // /** // * Sets the details of a row visible or hidden. // * // * @param rowIndex the rowIndex of the...
return extension.getRpcManager(DetailsOpenCloseServerRpc.class.getName()) != null;
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/features/version/VersionUtils.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/Repertories.java // public class Repertories { // public static final String HOST = "po.ittianyu.com"; // public static final String URL_BASE = "https://" + HOST + "/"; // // private RemoteApi remoteApi; // private CacheApi cacheApi; // pr...
import android.content.Context; import android.content.Intent; import com.allenliu.versionchecklib.VersionParams; import com.ittianyu.pocenter.common.api.Repertories;
package com.ittianyu.pocenter.features.version; /** * Created by yu on 2017/1/19. */ public class VersionUtils { /** * check version * @param context */ public static void check(Context context) { check(context, false); } /** * check version * @param context *...
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/Repertories.java // public class Repertories { // public static final String HOST = "po.ittianyu.com"; // public static final String URL_BASE = "https://" + HOST + "/"; // // private RemoteApi remoteApi; // private CacheApi cacheApi; // pr...
.setRequestUrl(Repertories.URL_BASE + "version.json")
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/features/find/FindAdapter.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/base/BaseApplication.java // public class BaseApplication extends Application { // private static Context context; // private static Repertories repertories; // // // tinker patch config // private ApplicationLike tinkerApplicationLike; // // ...
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.ittianyu.pocenter.R; import com.ittianyu.pocenter.common.base.BaseApplication; import com.ittianyu.pocenter.common.bean.ProjectBean; import java.text.SimpleDateFormat; import java.util.List; import jav...
package com.ittianyu.pocenter.features.find; /** * Created by yu on 2017/1/17. */ public class FindAdapter extends BaseQuickAdapter<ProjectBean, BaseViewHolder> { public FindAdapter(List<ProjectBean> data) { super(R.layout.item_find, data); } @Override protected void convert(BaseViewHolde...
// Path: app/src/main/java/com/ittianyu/pocenter/common/base/BaseApplication.java // public class BaseApplication extends Application { // private static Context context; // private static Repertories repertories; // // // tinker patch config // private ApplicationLike tinkerApplicationLike; // // ...
List<String> types = BaseApplication.getRepertories().getAllTypes();
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/features/search/SearchAdapter.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/base/BaseApplication.java // public class BaseApplication extends Application { // private static Context context; // private static Repertories repertories; // // // tinker patch config // private ApplicationLike tinkerApplicationLike; // // ...
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.ittianyu.pocenter.R; import com.ittianyu.pocenter.common.base.BaseApplication; import com.ittianyu.pocenter.common.bean.ProjectBean; import java.text.SimpleDateFormat; import java.util.List; import jav...
package com.ittianyu.pocenter.features.search; /** * Created by yu on 2017/1/17. */ public class SearchAdapter extends BaseQuickAdapter<ProjectBean, BaseViewHolder> { public SearchAdapter(List<ProjectBean> data) { super(R.layout.item_search, data); } @Override protected void convert(BaseV...
// Path: app/src/main/java/com/ittianyu/pocenter/common/base/BaseApplication.java // public class BaseApplication extends Application { // private static Context context; // private static Repertories repertories; // // // tinker patch config // private ApplicationLike tinkerApplicationLike; // // ...
List<String> types = BaseApplication.getRepertories().getAllTypes();
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/features/search/SearchPresenter.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java // public interface RemoteApi { // interface Type { // int OTHER = 0; // int WEB = 1; // int WE_CHAT = 2; // int HTML5 = 3; // int APP = 4; // int INTELLIGENT_HARDWARE = 5; // int DESKT...
import com.ittianyu.pocenter.common.api.RemoteApi; import com.ittianyu.pocenter.common.base.BasePresenter; import com.ittianyu.pocenter.common.bean.ProjectBean; import com.orhanobut.logger.Logger; import java.util.List; import io.reactivex.functions.Consumer;
package com.ittianyu.pocenter.features.search; /** * Created by yu on 2017/1/17. */ public class SearchPresenter extends BasePresenter<SearchContract.View> implements SearchContract.Presenter { private static final int COUNT = 20; private String[] keywords; @Override public void loadData(final bo...
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java // public interface RemoteApi { // interface Type { // int OTHER = 0; // int WEB = 1; // int WE_CHAT = 2; // int HTML5 = 3; // int APP = 4; // int INTELLIGENT_HARDWARE = 5; // int DESKT...
.getList(0, COUNT, null, RemoteApi.Status.RECRUITING, keywords, pullToRefresh)
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/features/search/SearchPresenter.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java // public interface RemoteApi { // interface Type { // int OTHER = 0; // int WEB = 1; // int WE_CHAT = 2; // int HTML5 = 3; // int APP = 4; // int INTELLIGENT_HARDWARE = 5; // int DESKT...
import com.ittianyu.pocenter.common.api.RemoteApi; import com.ittianyu.pocenter.common.base.BasePresenter; import com.ittianyu.pocenter.common.bean.ProjectBean; import com.orhanobut.logger.Logger; import java.util.List; import io.reactivex.functions.Consumer;
package com.ittianyu.pocenter.features.search; /** * Created by yu on 2017/1/17. */ public class SearchPresenter extends BasePresenter<SearchContract.View> implements SearchContract.Presenter { private static final int COUNT = 20; private String[] keywords; @Override public void loadData(final bo...
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java // public interface RemoteApi { // interface Type { // int OTHER = 0; // int WEB = 1; // int WE_CHAT = 2; // int HTML5 = 3; // int APP = 4; // int INTELLIGENT_HARDWARE = 5; // int DESKT...
.subscribe(new Consumer<List<ProjectBean>>() {
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/features/version/CheckVersionService.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/utils/UnsafeOkHttpUtils.java // public class UnsafeOkHttpUtils { // /** // * don't verify certificate // * @return // */ // public static OkHttpClient getClient() { // try { // // Create a trust manager that does not vali...
import android.content.Intent; import android.os.IBinder; import android.widget.Toast; import com.allenliu.versionchecklib.AVersionService; import com.google.gson.Gson; import com.ittianyu.pocenter.BuildConfig; import com.ittianyu.pocenter.R; import com.ittianyu.pocenter.common.utils.UnsafeOkHttpUtils; import com.zhy.h...
package com.ittianyu.pocenter.features.version; public class CheckVersionService extends AVersionService { public static final String SHOW_LAST = "showLast"; private boolean showLast = false; public CheckVersionService() {
// Path: app/src/main/java/com/ittianyu/pocenter/common/utils/UnsafeOkHttpUtils.java // public class UnsafeOkHttpUtils { // /** // * don't verify certificate // * @return // */ // public static OkHttpClient getClient() { // try { // // Create a trust manager that does not vali...
OkHttpUtils.initClient(UnsafeOkHttpUtils.getClient());
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/bean/ProjectBean.java // public class ProjectBean { // public int id; // public String projectId; // public String title; // public String description; // public String price; // public int type; // public String cycle; // public in...
import com.ittianyu.pocenter.common.bean.ProjectBean; import java.util.List; import io.reactivex.Observable; import retrofit2.http.GET; import retrofit2.http.Query;
package com.ittianyu.pocenter.common.api; /** * Created by yu on 2017/1/17. */ public interface RemoteApi { interface Type { int OTHER = 0; int WEB = 1; int WE_CHAT = 2; int HTML5 = 3; int APP = 4; int INTELLIGENT_HARDWARE = 5; int DESKTOP_APP = 6; ...
// Path: app/src/main/java/com/ittianyu/pocenter/common/bean/ProjectBean.java // public class ProjectBean { // public int id; // public String projectId; // public String title; // public String description; // public String price; // public int type; // public String cycle; // public in...
Observable<List<ProjectBean>> getList(@Query("start") int start, @Query("count") int count,
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/features/home/HomeAdapter.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/base/BaseApplication.java // public class BaseApplication extends Application { // private static Context context; // private static Repertories repertories; // // // tinker patch config // private ApplicationLike tinkerApplicationLike; // // ...
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.ittianyu.pocenter.R; import com.ittianyu.pocenter.common.base.BaseApplication; import com.ittianyu.pocenter.common.bean.ProjectBean; import java.text.SimpleDateFormat; import java.util.List; import jav...
package com.ittianyu.pocenter.features.home; /** * Created by yu on 2017/1/17. */ public class HomeAdapter extends BaseQuickAdapter<ProjectBean, BaseViewHolder> { public HomeAdapter(List<ProjectBean> data) { super(R.layout.item_home, data); } @Override protected void convert(BaseViewHolde...
// Path: app/src/main/java/com/ittianyu/pocenter/common/base/BaseApplication.java // public class BaseApplication extends Application { // private static Context context; // private static Repertories repertories; // // // tinker patch config // private ApplicationLike tinkerApplicationLike; // // ...
List<String> types = BaseApplication.getRepertories().getAllTypes();
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/features/find/FindPresenter.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java // public interface RemoteApi { // interface Type { // int OTHER = 0; // int WEB = 1; // int WE_CHAT = 2; // int HTML5 = 3; // int APP = 4; // int INTELLIGENT_HARDWARE = 5; // int DESKT...
import com.ittianyu.pocenter.common.api.RemoteApi; import com.ittianyu.pocenter.common.base.BasePresenter; import com.ittianyu.pocenter.common.bean.ProjectBean; import java.util.List; import io.reactivex.functions.Consumer;
package com.ittianyu.pocenter.features.find; /** * Created by yu on 2017/1/17. */ public class FindPresenter extends BasePresenter<FindContract.View> implements FindContract.Presenter { private static final int COUNT = 20; @Override public void loadData(final boolean pullToRefresh) { applica...
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java // public interface RemoteApi { // interface Type { // int OTHER = 0; // int WEB = 1; // int WE_CHAT = 2; // int HTML5 = 3; // int APP = 4; // int INTELLIGENT_HARDWARE = 5; // int DESKT...
.getList(0, COUNT, null, RemoteApi.Status.RECRUITING, null, pullToRefresh)
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/features/find/FindPresenter.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java // public interface RemoteApi { // interface Type { // int OTHER = 0; // int WEB = 1; // int WE_CHAT = 2; // int HTML5 = 3; // int APP = 4; // int INTELLIGENT_HARDWARE = 5; // int DESKT...
import com.ittianyu.pocenter.common.api.RemoteApi; import com.ittianyu.pocenter.common.base.BasePresenter; import com.ittianyu.pocenter.common.bean.ProjectBean; import java.util.List; import io.reactivex.functions.Consumer;
package com.ittianyu.pocenter.features.find; /** * Created by yu on 2017/1/17. */ public class FindPresenter extends BasePresenter<FindContract.View> implements FindContract.Presenter { private static final int COUNT = 20; @Override public void loadData(final boolean pullToRefresh) { applica...
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java // public interface RemoteApi { // interface Type { // int OTHER = 0; // int WEB = 1; // int WE_CHAT = 2; // int HTML5 = 3; // int APP = 4; // int INTELLIGENT_HARDWARE = 5; // int DESKT...
.subscribe(new Consumer<List<ProjectBean>>() {
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/features/home/HomePresenter.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java // public interface RemoteApi { // interface Type { // int OTHER = 0; // int WEB = 1; // int WE_CHAT = 2; // int HTML5 = 3; // int APP = 4; // int INTELLIGENT_HARDWARE = 5; // int DESKT...
import com.ittianyu.pocenter.common.api.RemoteApi; import com.ittianyu.pocenter.common.base.BaseApplication; import com.ittianyu.pocenter.common.base.BasePresenter; import com.ittianyu.pocenter.common.bean.ProjectBean; import java.util.List; import io.reactivex.functions.Consumer;
package com.ittianyu.pocenter.features.home; /** * Created by yu on 2017/1/17. */ public class HomePresenter extends BasePresenter<HomeContract.View> implements HomeContract.Presenter { private static final int COUNT = 20; private int[] types; public HomePresenter() { loadTypes(); } ...
// Path: app/src/main/java/com/ittianyu/pocenter/common/api/RemoteApi.java // public interface RemoteApi { // interface Type { // int OTHER = 0; // int WEB = 1; // int WE_CHAT = 2; // int HTML5 = 3; // int APP = 4; // int INTELLIGENT_HARDWARE = 5; // int DESKT...
types = BaseApplication.getRepertories().getTypes();
ittianyu/POCenter
app/src/main/java/com/ittianyu/pocenter/common/api/CacheApi.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/bean/ProjectBean.java // public class ProjectBean { // public int id; // public String projectId; // public String title; // public String description; // public String price; // public int type; // public String cycle; // public in...
import com.ittianyu.pocenter.common.bean.ProjectBean; import java.util.List; import java.util.concurrent.TimeUnit; import io.reactivex.Observable; import io.rx_cache2.DynamicKey; import io.rx_cache2.EvictDynamicKey; import io.rx_cache2.LifeCache;
package com.ittianyu.pocenter.common.api; /** * Created by yu on 2017/1/17. */ public interface CacheApi { @LifeCache(duration = 15, timeUnit = TimeUnit.MINUTES)
// Path: app/src/main/java/com/ittianyu/pocenter/common/bean/ProjectBean.java // public class ProjectBean { // public int id; // public String projectId; // public String title; // public String description; // public String price; // public int type; // public String cycle; // public in...
Observable<List<ProjectBean>> getList(Observable<List<ProjectBean>> repo, DynamicKey key, EvictDynamicKey isUpdate);
ittianyu/POCenter
app/src/test/java/com/ittianyu/pocenter/ExampleUnitTest.java
// Path: app/src/main/java/com/ittianyu/pocenter/common/utils/UnsafeOkHttpUtils.java // public class UnsafeOkHttpUtils { // /** // * don't verify certificate // * @return // */ // public static OkHttpClient getClient() { // try { // // Create a trust manager that does not vali...
import com.ittianyu.pocenter.common.utils.UnsafeOkHttpUtils; import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; import org.junit.Test; import java.io.IOException; import io.reactivex.Observable; import io.reactivex.functions.Consumer; import okhttp3.ResponseBody; import retrofit2.Retrofit; impo...
package com.ittianyu.pocenter; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { public static final String HOST = "po.ittianyu.com"; public static f...
// Path: app/src/main/java/com/ittianyu/pocenter/common/utils/UnsafeOkHttpUtils.java // public class UnsafeOkHttpUtils { // /** // * don't verify certificate // * @return // */ // public static OkHttpClient getClient() { // try { // // Create a trust manager that does not vali...
.client(UnsafeOkHttpUtils.getClient())
ciphertechsolutions/IO
src/com/ciphertechsolutions/io/ewf/Section.java
// Path: src/com/ciphertechsolutions/io/processing/triage/ByteUtils.java // public class ByteUtils { // // /** // * Converts a long to a little endian byte array. // * @param l The long to convert // * @return A little endian array. // */ // public static byte[] longToBytes(long l) { // byte[] res...
import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.Arrays; import java.util.zip.Adler32; import com.ciphertechsolutions.io.processing.triage.ByteUtils;
return currentOffset; } public void setCurrentOffset(long currentOffset) { this.nextOffset = this.nextOffset - (this.currentOffset - currentOffset); this.currentOffset = currentOffset; } /** * Get the offset of the next section. * @return The offset of the next sectio...
// Path: src/com/ciphertechsolutions/io/processing/triage/ByteUtils.java // public class ByteUtils { // // /** // * Converts a long to a little endian byte array. // * @param l The long to convert // * @return A little endian array. // */ // public static byte[] longToBytes(long l) { // byte[] res...
adlerCalc.update(ByteUtils.longToBytes(nextOffset));
ciphertechsolutions/IO
src/com/ciphertechsolutions/io/ewf/TableSection.java
// Path: src/com/ciphertechsolutions/io/processing/triage/ByteUtils.java // public class ByteUtils { // // /** // * Converts a long to a little endian byte array. // * @param l The long to convert // * @return A little endian array. // */ // public static byte[] longToBytes(long l) { // byte[] res...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.zip.Adler32; import com.ciphertechsolutions.io.processing.triage.ByteUtils;
this.baseOffset = baseOffset; this.offsetArray = offsetArray; this.secondaryAdler32 = secondaryAdler32; this.tableAdler32 = tableAdler32; } int tableEntries; // 4 bytes of padding. static final byte[] padding = {0x00, 0x00, 0x00, 0x00}; private final long baseOffset...
// Path: src/com/ciphertechsolutions/io/processing/triage/ByteUtils.java // public class ByteUtils { // // /** // * Converts a long to a little endian byte array. // * @param l The long to convert // * @return A little endian array. // */ // public static byte[] longToBytes(long l) { // byte[] res...
offsetChecksumCalc.update(ByteUtils.intToBytes(relativeOffset));
ciphertechsolutions/IO
src/com/ciphertechsolutions/io/processing/triage/StringCarver.java
// Path: src/com/ciphertechsolutions/io/logging/Logging.java // public class Logging { // // private static final List<LoggingStream> LOGGING_PRINT_STREAMS = Collections.synchronizedList(new ArrayList<>()); // // static { // LOGGING_PRINT_STREAMS.add(new LoggingStream(System.out, true)); // } // ...
import java.util.concurrent.TimeUnit; import com.ciphertechsolutions.io.logging.Logging; import javafx.util.Pair;
@Override public void initialize() { startThreads(); } @Override protected int getThreadCount() { return 1; } @Override protected void internalProcess() { try { while (isRunning && !Thread.currentThread().isInterrupted()) { ...
// Path: src/com/ciphertechsolutions/io/logging/Logging.java // public class Logging { // // private static final List<LoggingStream> LOGGING_PRINT_STREAMS = Collections.synchronizedList(new ArrayList<>()); // // static { // LOGGING_PRINT_STREAMS.add(new LoggingStream(System.out, true)); // } // ...
Logging.log(e);
ciphertechsolutions/IO
src/com/ciphertechsolutions/io/processing/ProcessorBase.java
// Path: src/com/ciphertechsolutions/io/logging/Logging.java // public class Logging { // // private static final List<LoggingStream> LOGGING_PRINT_STREAMS = Collections.synchronizedList(new ArrayList<>()); // // static { // LOGGING_PRINT_STREAMS.add(new LoggingStream(System.out, true)); // } // ...
import com.ciphertechsolutions.io.logging.Logging;
package com.ciphertechsolutions.io.processing; /** * Provides some of the basic functionality required to implement {@link IProcessor}. This implementation * assumes that the process will be spawning and managing child threads. */ public abstract class ProcessorBase implements IProcessor { protected boolean is...
// Path: src/com/ciphertechsolutions/io/logging/Logging.java // public class Logging { // // private static final List<LoggingStream> LOGGING_PRINT_STREAMS = Collections.synchronizedList(new ArrayList<>()); // // static { // LOGGING_PRINT_STREAMS.add(new LoggingStream(System.out, true)); // } // ...
Logging.log(e);
ciphertechsolutions/IO
src/com/ciphertechsolutions/io/processing/CompressionTask.java
// Path: src/com/ciphertechsolutions/io/ewf/DataChunk.java // public class DataChunk { // /** // * The raw data. // */ // public final byte[] data; // /** // * The size of the data, in bytes. // */ // public final int size; // /** // * The size of the uncompressed data, may ...
import java.io.UnsupportedEncodingException; import java.util.Arrays; import java.util.concurrent.Callable; import java.util.zip.DataFormatException; import java.util.zip.Deflater; import java.util.zip.Inflater; import javax.xml.bind.DatatypeConverter; import com.ciphertechsolutions.io.ewf.DataChunk; import com.ciphert...
package com.ciphertechsolutions.io.processing; class CompressionTask implements Callable<DataChunk> { private final byte[] input; private final int compressionLevel; CompressionTask(byte[] toCompress, int compressionLevel) { input = toCompress; this.compressionLevel = compressionLevel;...
// Path: src/com/ciphertechsolutions/io/ewf/DataChunk.java // public class DataChunk { // /** // * The raw data. // */ // public final byte[] data; // /** // * The size of the data, in bytes. // */ // public final int size; // /** // * The size of the uncompressed data, may ...
System.arraycopy(ByteUtils.intToBytes(deflater.getAdler()), 0, output, input.length, 4);
ciphertechsolutions/IO
src/com/ciphertechsolutions/io/ewf/VolumeSectionManager.java
// Path: src/com/ciphertechsolutions/io/device/Device.java // public abstract class Device { // // /** // * The simple name of a device. // */ // protected String name; // // /// The path to read the device with. // protected String path; // // /** // * The size of the device in ...
import java.io.IOException; import java.io.RandomAccessFile; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import com.ciphertechsolutions....
package com.ciphertechsolutions.io.ewf; public class VolumeSectionManager { private final Map<RandomAccessFile, List<VolumeSection>> volumeSections; private final byte[] EMPTY_VOLUME_SECTION = new byte[VolumeSection.ADDITIONAL_SECTION_SIZE + Section.SECTION_HEADER_SIZE];
// Path: src/com/ciphertechsolutions/io/device/Device.java // public abstract class Device { // // /** // * The simple name of a device. // */ // protected String name; // // /// The path to read the device with. // protected String path; // // /** // * The size of the device in ...
private final Device imagedDisk;
ciphertechsolutions/IO
src/com/ciphertechsolutions/io/ewf/VolumeSection.java
// Path: src/com/ciphertechsolutions/io/device/Device.java // public abstract class Device { // // /** // * The simple name of a device. // */ // protected String name; // // /// The path to read the device with. // protected String path; // // /** // * The size of the device in ...
import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.zip.Adler32; import com.ciphertechsolutions.io.device.Device;
package com.ciphertechsolutions.io.ewf; /** * A class to represent the Volume section in the Encase6 format. */ public class VolumeSection extends Section { static final int ADDITIONAL_SECTION_SIZE = 1052; //TODO: Enum? //0x00 => removable disk // 0x01 => fixed disk // 0x03 => optical disk /...
// Path: src/com/ciphertechsolutions/io/device/Device.java // public abstract class Device { // // /** // * The simple name of a device. // */ // protected String name; // // /// The path to read the device with. // protected String path; // // /** // * The size of the device in ...
protected VolumeSection(long currentOffset, Device disk, byte[] guid) {
ciphertechsolutions/IO
src/com/ciphertechsolutions/io/ui/ImagingController.java
// Path: src/com/ciphertechsolutions/io/applicationLogic/Utils.java // public class Utils { // // /** // * Converts the given duration to a string in the format of "x days hh:mm:ss", "hh:mm:ss", or "x seconds", // * depending on the amount of time in the duration. // * @param duration The duration t...
import java.net.URL; import java.time.Duration; import java.util.List; import java.util.ResourceBundle; import com.ciphertechsolutions.io.applicationLogic.Utils; import javafx.application.Platform; import javafx.beans.value.ChangeListener; import javafx.beans.value.WeakChangeListener; import javafx.collections.ListChan...
private int calls; private double lastAverage; private final long max; private final long startTime; protected ProgressStatus() { calls = 0; lastAverage = 0; max = workflowController.getMaxOutputCount(); startTime = System.nanoTime...
// Path: src/com/ciphertechsolutions/io/applicationLogic/Utils.java // public class Utils { // // /** // * Converts the given duration to a string in the format of "x days hh:mm:ss", "hh:mm:ss", or "x seconds", // * depending on the amount of time in the duration. // * @param duration The duration t...
return Utils.getPrettyTime(Duration.ofSeconds(Math.max(Math.round(lastAverage - (System.nanoTime() - startTime) / 1000000000), 0)));
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/GuiceyMongoBinder.java
// Path: src/main/java/com/lowereast/guiceymongo/guice/GuiceyMongoUtil.java // public final class GuiceyMongoUtil { // @Inject // static Injector _injector; // // private GuiceyMongoUtil() {} // // public static String getCurrentConfiguration() { // return _injector.getInstance(Key.get(String.class, Configura...
import java.util.Map; import com.google.inject.Binder; import com.google.inject.Key; import com.google.inject.Module; import com.lowereast.guiceymongo.guice.GuiceyMongoUtil;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/guice/GuiceyMongoUtil.java // public final class GuiceyMongoUtil { // @Inject // static Injector _injector; // // private GuiceyMongoUtil() {} // // public static String getCurrentConfiguration() { // return _injector.getInstance(Key.get(String.class, Configura...
_binder.install(new SingletonModule<Class<GuiceyMongoUtil>>(GuiceyMongoUtil.class) {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/data/generator/property/ListProperty.java
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/ListType.java // public class ListType extends Type { // private Type _itemType; // // public ListType(Type itemType) { // super("list", "java.util.List<" + itemType.getJavaType() + ">"); // _itemType = itemType; // } // // public Type getI...
import com.lowereast.guiceymongo.data.generator.type.ListType; import com.lowereast.guiceymongo.data.generator.type.PrimitiveType; import com.lowereast.guiceymongo.data.generator.type.Type; import com.lowereast.guiceymongo.data.generator.type.UserDataType;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/ListType.java // public class ListType extends Type { // private Type _itemType; // // public ListType(Type itemType) { // super("list", "java.util.List<" + itemType.getJavaType() + ">"); // _itemType = itemType; // } // // public Type getI...
Type type = super.getType().getItemType();
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/data/generator/property/ListProperty.java
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/ListType.java // public class ListType extends Type { // private Type _itemType; // // public ListType(Type itemType) { // super("list", "java.util.List<" + itemType.getJavaType() + ">"); // _itemType = itemType; // } // // public Type getI...
import com.lowereast.guiceymongo.data.generator.type.ListType; import com.lowereast.guiceymongo.data.generator.type.PrimitiveType; import com.lowereast.guiceymongo.data.generator.type.Type; import com.lowereast.guiceymongo.data.generator.type.UserDataType;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/ListType.java // public class ListType extends Type { // private Type _itemType; // // public ListType(Type itemType) { // super("list", "java.util.List<" + itemType.getJavaType() + ">"); // _itemType = itemType; // } // // public Type getI...
if (type instanceof PrimitiveType)
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/data/generator/property/PrimitiveProperty.java
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/option/Option.java // public class Option { // private final String _name; // private final Map<String, Object> _parameters = Maps.newHashMap(); // // public Option(String name) { // _name = name; // } // // public String getName() { // return...
import java.util.Map; import com.lowereast.guiceymongo.data.generator.option.Option; import com.lowereast.guiceymongo.data.generator.type.PrimitiveType; import com.lowereast.guiceymongo.data.generator.type.UserDataType;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/option/Option.java // public class Option { // private final String _name; // private final Map<String, Object> _parameters = Maps.newHashMap(); // // public Option(String name) { // _name = name; // } // // public String getName() { // return...
Option option = super.getOption("identity");
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/data/generator/PrimitivePropertyGenerator.java
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/property/PrimitiveProperty.java // public class PrimitiveProperty extends Property<PrimitiveType> { // public PrimitiveProperty(UserDataType enclosingType, String name, PrimitiveType type, String comment, boolean useCamelCaseKeys) { // super(enclosingTy...
import java.io.IOException; import org.antlr.stringtemplate.StringTemplate; import com.lowereast.guiceymongo.data.generator.property.PrimitiveProperty; import com.lowereast.guiceymongo.data.generator.type.PrimitiveType; import com.lowereast.guiceymongo.data.generator.type.Type;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/property/PrimitiveProperty.java // public class PrimitiveProperty extends Property<PrimitiveType> { // public PrimitiveProperty(UserDataType enclosingType, String name, PrimitiveType type, String comment, boolean useCamelCaseKeys) { // super(enclosingTy...
Type type = property.getType();
mattinsler/com.lowereast.guiceymongo
src/examples/CollectionConfigurationExample.java
// Path: src/main/java/com/lowereast/guiceymongo/guice/GuiceyMongo.java // public final class GuiceyMongo { // private GuiceyMongo() {} // // public static Builders.Configuration configure(String configurationName) { // return new BuilderImpls.Configuration(configurationName); // } // // public static Builders...
import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.lowereast.guiceymongo.guice.GuiceyMongo; import com.lowereast.guiceymongo.guice.annotation.GuiceyMongoCollection; import com.mongodb.DBCollection;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/guice/GuiceyMongo.java // public final class GuiceyMongo { // private GuiceyMongo() {} // // public static Builders.Configuration configure(String configurationName) { // return new BuilderImpls.Configuration(configurationName); // } // // public static Builders...
GuiceyMongo.configure(Configurations.Test)
mattinsler/com.lowereast.guiceymongo
src/examples/DatabaseConfigurationExample.java
// Path: src/main/java/com/lowereast/guiceymongo/guice/GuiceyMongo.java // public final class GuiceyMongo { // private GuiceyMongo() {} // // public static Builders.Configuration configure(String configurationName) { // return new BuilderImpls.Configuration(configurationName); // } // // public static Builders...
import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.matcher.Matchers; import com.lowereast.guiceymongo....
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/guice/GuiceyMongo.java // public final class GuiceyMongo { // private GuiceyMongo() {} // // public static Builders.Configuration configure(String configurationName) { // return new BuilderImpls.Configuration(configurationName); // } // // public static Builders...
GuiceyMongo.configure(Configurations.Production)
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/AnnotationUtil.java
// Path: src/main/java/com/lowereast/guiceymongo/annotation/Annotations.java // public class Annotations { // private static class AnnotationProxy<T extends Annotation> implements InvocationHandler { // private final Class<T> _annotationClass; // private final List<String> _elements = Lists.newArrayList(); // pr...
import com.google.inject.internal.ImmutableMap; import com.lowereast.guiceymongo.annotation.Annotations; import com.lowereast.guiceymongo.guice.annotation.GuiceyMongoBucket; import com.lowereast.guiceymongo.guice.annotation.GuiceyMongoCollection; import com.lowereast.guiceymongo.guice.annotation.GuiceyMongoDatabase;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/annotation/Annotations.java // public class Annotations { // private static class AnnotationProxy<T extends Annotation> implements InvocationHandler { // private final Class<T> _annotationClass; // private final List<String> _elements = Lists.newArrayList(); // pr...
return Annotations.proxy(ClonedConfiguration.class, ImmutableMap.<String, Object>of("configuration", configuration));
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/GuiceyMongoBindingCollector.java
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // }
import java.util.List; import java.util.Map; import java.util.Set; import com.google.inject.Key; import com.google.inject.Module; import com.google.inject.internal.Lists; import com.google.inject.internal.Maps; import com.google.inject.internal.Sets; import com.lowereast.guiceymongo.data.IsData;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/GuiceyMongoBindingCollector.java import java.util.List; import java.util.Map; import java.util.Set; import com.google.inject.Key; import com.google.inject.Modu...
public <T extends IsData> void bindConfiguredCollectionDataType(String configurationName, String collectionKey, Class<T> dataType) {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/data/generator/TypeRegistry.java
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/BlobType.java // public class BlobType extends Type { // public BlobType() { // super("blob", null); // } // // public static BlobType BlobType = new BlobType(); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/Prim...
import java.util.HashMap; import java.util.List; import java.util.Map; import com.google.inject.internal.Lists; import com.lowereast.guiceymongo.data.generator.type.BlobType; import com.lowereast.guiceymongo.data.generator.type.PrimitiveType; import com.lowereast.guiceymongo.data.generator.type.Type; import com.lowerea...
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/BlobType.java // public class BlobType extends Type { // public BlobType() { // super("blob", null); // } // // public static BlobType BlobType = new BlobType(); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/Prim...
addType(PrimitiveType.BoolType);
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/data/generator/TypeRegistry.java
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/BlobType.java // public class BlobType extends Type { // public BlobType() { // super("blob", null); // } // // public static BlobType BlobType = new BlobType(); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/Prim...
import java.util.HashMap; import java.util.List; import java.util.Map; import com.google.inject.internal.Lists; import com.lowereast.guiceymongo.data.generator.type.BlobType; import com.lowereast.guiceymongo.data.generator.type.PrimitiveType; import com.lowereast.guiceymongo.data.generator.type.Type; import com.lowerea...
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/BlobType.java // public class BlobType extends Type { // public BlobType() { // super("blob", null); // } // // public static BlobType BlobType = new BlobType(); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/Prim...
addType(BlobType.BlobType);
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/data/generator/TypeRegistry.java
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/BlobType.java // public class BlobType extends Type { // public BlobType() { // super("blob", null); // } // // public static BlobType BlobType = new BlobType(); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/Prim...
import java.util.HashMap; import java.util.List; import java.util.Map; import com.google.inject.internal.Lists; import com.lowereast.guiceymongo.data.generator.type.BlobType; import com.lowereast.guiceymongo.data.generator.type.PrimitiveType; import com.lowereast.guiceymongo.data.generator.type.Type; import com.lowerea...
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/BlobType.java // public class BlobType extends Type { // public BlobType() { // super("blob", null); // } // // public static BlobType BlobType = new BlobType(); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/Prim...
public <T extends Type> T getScopedGuiceyType(UserDataType scopingType, String guiceyType) {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/GuiceyCollection.java
// Path: src/main/java/com/lowereast/guiceymongo/data/DataWrapper.java // public interface DataWrapper<T extends IsData> { // T wrap(DBObject backing); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/IsBuilder.java // public interface IsBuilder<T extends IsData> { // DBObject build(); // } // // Path:...
import com.lowereast.guiceymongo.data.DataWrapper; import com.lowereast.guiceymongo.data.IsBuilder; import com.lowereast.guiceymongo.data.IsData; import com.mongodb.*; import java.util.List;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/DataWrapper.java // public interface DataWrapper<T extends IsData> { // T wrap(DBObject backing); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/IsBuilder.java // public interface IsBuilder<T extends IsData> { // DBObject build(); // } // // Path:...
private final DataWrapper<Item> _wrapper;
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/GuiceyCollection.java
// Path: src/main/java/com/lowereast/guiceymongo/data/DataWrapper.java // public interface DataWrapper<T extends IsData> { // T wrap(DBObject backing); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/IsBuilder.java // public interface IsBuilder<T extends IsData> { // DBObject build(); // } // // Path:...
import com.lowereast.guiceymongo.data.DataWrapper; import com.lowereast.guiceymongo.data.IsBuilder; import com.lowereast.guiceymongo.data.IsData; import com.mongodb.*; import java.util.List;
public Item findAndRemove(DBObject query, DBObject sort) { DBObject command = new BasicDBObject("findandmodify", _collection.getName()) .append("remove", true); if (query != null && !EMPTY.equals(query)) command.put("query", query); if (sort != null && !EMPTY.equals(sort)) command.put("sort", sort); ...
// Path: src/main/java/com/lowereast/guiceymongo/data/DataWrapper.java // public interface DataWrapper<T extends IsData> { // T wrap(DBObject backing); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/IsBuilder.java // public interface IsBuilder<T extends IsData> { // DBObject build(); // } // // Path:...
public void insert(IsBuilder<Item> item) {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/DBProviderModule.java
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoException.java // public class GuiceyMongoException extends RuntimeException { // public GuiceyMongoException() { // } // public GuiceyMongoException(String message) { // super(message); // } // public GuiceyMongoException(String me...
import com.google.inject.*; import com.lowereast.guiceymongo.GuiceyMongoException; import com.lowereast.guiceymongo.guice.annotation.GuiceyMongoDatabase; import com.mongodb.DB; import com.mongodb.Mongo; import com.mongodb.MongoException; import java.net.UnknownHostException; import java.util.UUID;
} private void cacheDB() throws MongoException, UnknownHostException { String databaseKey = ((GuiceyMongoDatabase)key.getAnnotation()).value(); String clonedConfiguration = getInstance(_injector, Key.get(String.class, AnnotationUtil.clonedConfiguration(_configuration))); if (clonedConfiguration == null) { ...
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoException.java // public class GuiceyMongoException extends RuntimeException { // public GuiceyMongoException() { // } // public GuiceyMongoException(String message) { // super(message); // } // public GuiceyMongoException(String me...
throw new GuiceyMongoException("Could not connect to an instance of MongoDB", e);
mattinsler/com.lowereast.guiceymongo
src/examples/RemoteDatabaseConfigurationExample.java
// Path: src/main/java/com/lowereast/guiceymongo/guice/GuiceyMongo.java // public final class GuiceyMongo { // private GuiceyMongo() {} // // public static Builders.Configuration configure(String configurationName) { // return new BuilderImpls.Configuration(configurationName); // } // // public static Builders...
import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.lowereast.guiceymongo.guice.GuiceyMongo; import com.lowereast.guiceymongo.guice.annotation.GuiceyMongoDatabase; import com.mongodb.DB;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/guice/GuiceyMongo.java // public final class GuiceyMongo { // private GuiceyMongo() {} // // public static Builders.Configuration configure(String configurationName) { // return new BuilderImpls.Configuration(configurationName); // } // // public static Builders...
GuiceyMongo.configureConnection(Connections.Primary)
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/data/generator/property/SetProperty.java
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/PrimitiveType.java // public class PrimitiveType extends Type { // private final String _javaBoxedType; // // public PrimitiveType(String guiceyType, String javaType, String javaBoxedType) { // super(guiceyType, javaType); // _javaBoxedType = j...
import com.lowereast.guiceymongo.data.generator.type.PrimitiveType; import com.lowereast.guiceymongo.data.generator.type.SetType; import com.lowereast.guiceymongo.data.generator.type.Type; import com.lowereast.guiceymongo.data.generator.type.UserDataType;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/PrimitiveType.java // public class PrimitiveType extends Type { // private final String _javaBoxedType; // // public PrimitiveType(String guiceyType, String javaType, String javaBoxedType) { // super(guiceyType, javaType); // _javaBoxedType = j...
Type type = super.getType().getItemType();
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/data/generator/property/SetProperty.java
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/PrimitiveType.java // public class PrimitiveType extends Type { // private final String _javaBoxedType; // // public PrimitiveType(String guiceyType, String javaType, String javaBoxedType) { // super(guiceyType, javaType); // _javaBoxedType = j...
import com.lowereast.guiceymongo.data.generator.type.PrimitiveType; import com.lowereast.guiceymongo.data.generator.type.SetType; import com.lowereast.guiceymongo.data.generator.type.Type; import com.lowereast.guiceymongo.data.generator.type.UserDataType;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/generator/type/PrimitiveType.java // public class PrimitiveType extends Type { // private final String _javaBoxedType; // // public PrimitiveType(String guiceyType, String javaType, String javaBoxedType) { // super(guiceyType, javaType); // _javaBoxedType = j...
if (type instanceof PrimitiveType)
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/JavascriptProxy.java
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoEvalException.java // @SuppressWarnings("serial") // public class GuiceyMongoEvalException extends MongoException { // private static String _errorPrefix = "eval failed: { \"errno\" : -3.0 , \"errmsg\" : \"invoke failed: JS Error: "; // // private String _...
import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Proxy; import java.util.List; import java.util.Map; import com.google.inject.Binder; import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Key; ...
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoEvalException.java // @SuppressWarnings("serial") // public class GuiceyMongoEvalException extends MongoException { // private static String _errorPrefix = "eval failed: { \"errno\" : -3.0 , \"errmsg\" : \"invoke failed: JS Error: "; // // private String _...
binder.skipSources(JavascriptProxy.class, GuiceyMongo.class).bind(_proxyInterface).toProvider(this);
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/JavascriptProxy.java
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoEvalException.java // @SuppressWarnings("serial") // public class GuiceyMongoEvalException extends MongoException { // private static String _errorPrefix = "eval failed: { \"errno\" : -3.0 , \"errmsg\" : \"invoke failed: JS Error: "; // // private String _...
import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Proxy; import java.util.List; import java.util.Map; import com.google.inject.Binder; import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Key; ...
public Object invoke(DB database, Object[] args) { return database.eval(_code); } } private static class VoidInvocation implements Invocation { private final String _code; public VoidInvocation(String methodName, Class<?>[] argumentTypes) { String argumentString = createArgumentString(argumentTypes.le...
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoEvalException.java // @SuppressWarnings("serial") // public class GuiceyMongoEvalException extends MongoException { // private static String _errorPrefix = "eval failed: { \"errno\" : -3.0 , \"errmsg\" : \"invoke failed: JS Error: "; // // private String _...
private static class DBObjectToWrapperConverter<T extends IsData> implements Converter<DBObject, T> {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/JavascriptProxy.java
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoEvalException.java // @SuppressWarnings("serial") // public class GuiceyMongoEvalException extends MongoException { // private static String _errorPrefix = "eval failed: { \"errno\" : -3.0 , \"errmsg\" : \"invoke failed: JS Error: "; // // private String _...
import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Proxy; import java.util.List; import java.util.Map; import com.google.inject.Binder; import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Key; ...
return database.eval(_code); } } private static class VoidInvocation implements Invocation { private final String _code; public VoidInvocation(String methodName, Class<?>[] argumentTypes) { String argumentString = createArgumentString(argumentTypes.length); _code = "function" + argumentString + "{" +...
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoEvalException.java // @SuppressWarnings("serial") // public class GuiceyMongoEvalException extends MongoException { // private static String _errorPrefix = "eval failed: { \"errno\" : -3.0 , \"errmsg\" : \"invoke failed: JS Error: "; // // private String _...
private final DataWrapper<T> _wrapper;
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/JavascriptProxy.java
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoEvalException.java // @SuppressWarnings("serial") // public class GuiceyMongoEvalException extends MongoException { // private static String _errorPrefix = "eval failed: { \"errno\" : -3.0 , \"errmsg\" : \"invoke failed: JS Error: "; // // private String _...
import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Proxy; import java.util.List; import java.util.Map; import com.google.inject.Binder; import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Key; ...
} } private static class ListDBObjectToWrapperConverter<T extends IsData> implements Converter<List<DBObject>, List<T>> { private final DBObjectToWrapperConverter<T> _itemWrapper; public ListDBObjectToWrapperConverter(Class<T> dataClass) { _itemWrapper = new DBObjectToWrapperConverter<T>(dataClass); } ...
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoEvalException.java // @SuppressWarnings("serial") // public class GuiceyMongoEvalException extends MongoException { // private static String _errorPrefix = "eval failed: { \"errno\" : -3.0 , \"errmsg\" : \"invoke failed: JS Error: "; // // private String _...
if (IsData.class.isAssignableFrom(returnType) || IsWrapper.class.isAssignableFrom(returnType)) {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/JavascriptProxy.java
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoEvalException.java // @SuppressWarnings("serial") // public class GuiceyMongoEvalException extends MongoException { // private static String _errorPrefix = "eval failed: { \"errno\" : -3.0 , \"errmsg\" : \"invoke failed: JS Error: "; // // private String _...
import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Proxy; import java.util.List; import java.util.Map; import com.google.inject.Binder; import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Key; ...
String methodName = method.getName(); Class<?> methodReturnType = method.getReturnType(); Class<?>[] argumentTypes = method.getParameterTypes(); if (Void.class.equals(methodReturnType) || void.class.equals(methodReturnType)) { if (argumentTypes.length == 0) { invocation = ne...
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyMongoEvalException.java // @SuppressWarnings("serial") // public class GuiceyMongoEvalException extends MongoException { // private static String _errorPrefix = "eval failed: { \"errno\" : -3.0 , \"errmsg\" : \"invoke failed: JS Error: "; // // private String _...
throw GuiceyMongoEvalException.create(e);
mattinsler/com.lowereast.guiceymongo
src/examples/BucketConfigurationExample.java
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyBucket.java // public class GuiceyBucket { // private final GridFS _grid; // // public GuiceyBucket(GridFS gridFs) { // _grid = gridFs; // } // // public GuiceyBucket(DB database, String bucket) { // this(new GridFS(database, bucket)); // } // // pu...
import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.lowereast.guiceymongo.GuiceyBucket; import com.lowereast.guiceymongo.guice.GuiceyMongo; import com.lowereast.guiceymongo.guice.annotation.GuiceyMongoBucket; import com.mongodb.gridfs.GridFS;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/GuiceyBucket.java // public class GuiceyBucket { // private final GridFS _grid; // // public GuiceyBucket(GridFS gridFs) { // _grid = gridFs; // } // // public GuiceyBucket(DB database, String bucket) { // this(new GridFS(database, bucket)); // } // // pu...
GuiceyMongo.configure(Configurations.Test)
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // }
import com.google.inject.Module; import com.lowereast.guiceymongo.data.IsData;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java import com.google.inject.Module; import com.lowereast.guiceymongo.data.IsData; /** * Copyright (C) 2010 Lowereast Software * * License...
CollectionConfigurationOnlyTo ofType(Class<? extends IsData> dataType);
mattinsler/com.lowereast.guiceymongo
src/examples/StoredProcedureProxyExample.java
// Path: src/main/java/com/lowereast/guiceymongo/guice/GuiceyMongo.java // public final class GuiceyMongo { // private GuiceyMongo() {} // // public static Builders.Configuration configure(String configurationName) { // return new BuilderImpls.Configuration(configurationName); // } // // public static Builders...
import java.util.List; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.lowereast.guiceymongo.guice.GuiceyMongo; import com.mongodb.DBObject;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/guice/GuiceyMongo.java // public final class GuiceyMongo { // private GuiceyMongo() {} // // public static Builders.Configuration configure(String configurationName) { // return new BuilderImpls.Configuration(configurationName); // } // // public static Builders...
GuiceyMongo.configure(Configurations.Test)
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/GuiceyCursor.java
// Path: src/main/java/com/lowereast/guiceymongo/data/DataWrapper.java // public interface DataWrapper<T extends IsData> { // T wrap(DBObject backing); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // }
import java.util.Iterator; import com.lowereast.guiceymongo.data.DataWrapper; import com.lowereast.guiceymongo.data.IsData; import com.mongodb.DBCursor; import com.mongodb.DBObject;
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/DataWrapper.java // public interface DataWrapper<T extends IsData> { // T wrap(DBObject backing); // } // // Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // Path: src/main/java/com/lowereast/guiceymongo/GuiceyC...
private final DataWrapper<Item> _wrapper;
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/BuilderImpls.java
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
import com.google.inject.Binder; import com.google.inject.Module; import com.lowereast.guiceymongo.data.IsData; import com.lowereast.guiceymongo.guice.spi.Builders.BucketConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.BucketOptionConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.Coll...
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
public Builders.CollectionConfiguration mapCollection(String collectionKey) {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/BuilderImpls.java
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
import com.google.inject.Binder; import com.google.inject.Module; import com.lowereast.guiceymongo.data.IsData; import com.lowereast.guiceymongo.guice.spi.Builders.BucketConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.BucketOptionConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.Coll...
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
public Builders.DatabaseConfiguration mapDatabase(String databaseKey) {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/BuilderImpls.java
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
import com.google.inject.Binder; import com.google.inject.Module; import com.lowereast.guiceymongo.data.IsData; import com.lowereast.guiceymongo.guice.spi.Builders.BucketConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.BucketOptionConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.Coll...
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
public BucketConfiguration mapBucket(String bucketKey) {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/BuilderImpls.java
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
import com.google.inject.Binder; import com.google.inject.Module; import com.lowereast.guiceymongo.data.IsData; import com.lowereast.guiceymongo.guice.spi.Builders.BucketConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.BucketOptionConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.Coll...
public Configuration(String name) { _name = name; } public Module cloneFrom(String configurationName) { _collector.bindClonedConfiguration(_name, configurationName); return this; } public Builders.CollectionConfiguration mapCollection(String collectionKey) { return new Collection(this, collection...
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
private static class Database implements Builders.DatabaseConfiguration, Builders.DatabaseOptionConfiguration {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/BuilderImpls.java
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
import com.google.inject.Binder; import com.google.inject.Module; import com.lowereast.guiceymongo.data.IsData; import com.lowereast.guiceymongo.guice.spi.Builders.BucketConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.BucketOptionConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.Coll...
private final String _databaseKey; public Database(Configuration configuration, String databaseKey) { _configuration = configuration; _databaseKey = databaseKey; } public void configure(Binder binder) { _configuration.configure(binder); } public CollectionConfiguration mapCollection(String collecti...
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
private static class Collection implements Builders.CollectionConfiguration, Builders.CollectionConfigurationOnlyTo, Builders.CollectionOptionConfiguration {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/BuilderImpls.java
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
import com.google.inject.Binder; import com.google.inject.Module; import com.lowereast.guiceymongo.data.IsData; import com.lowereast.guiceymongo.guice.spi.Builders.BucketConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.BucketOptionConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.Coll...
public CollectionConfiguration mapCollection(String collectionKey) { return _configuration.mapCollection(collectionKey); } public DatabaseConfiguration mapDatabase(String databaseKey) { return _configuration.mapDatabase(databaseKey); } public FinishableConfiguration overConnection(String connectionKey) ...
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
public CollectionConfigurationOnlyTo ofType(Class<? extends IsData> dataType) {
mattinsler/com.lowereast.guiceymongo
src/main/java/com/lowereast/guiceymongo/guice/spi/BuilderImpls.java
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
import com.google.inject.Binder; import com.google.inject.Module; import com.lowereast.guiceymongo.data.IsData; import com.lowereast.guiceymongo.guice.spi.Builders.BucketConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.BucketOptionConfiguration; import com.lowereast.guiceymongo.guice.spi.Builders.Coll...
public BucketConfiguration mapBucket(String bucketKey) { return _configuration.mapBucket(bucketKey); } public DatabaseOptionConfiguration asTestDatabase() { return null; //To change body of implemented methods use File | Settings | File Templates. } } private static class Coll...
// Path: src/main/java/com/lowereast/guiceymongo/data/IsData.java // public interface IsData { // } // // Path: src/main/java/com/lowereast/guiceymongo/guice/spi/Builders.java // public interface BucketConfiguration { // BucketOptionConfiguration to(String bucket); // } // // Path: src/main/java/com/lowereast/guicey...
private static class Bucket implements Builders.BucketConfiguration, Builders.BucketOptionConfiguration {
buksy/jnlua
src/main/java/com/naef/jnlua/JavaModule.java
// Path: src/main/java/com/naef/jnlua/JavaReflector.java // public enum Metamethod { // /** // * <code>__index</code> metamethod. // */ // INDEX, // // /** // * <code>__newindex</code> metamethod. // */ // NEWINDEX, // // /** // * <code>__len</code> metamethod. // */ // LEN, // // ...
import java.lang.reflect.Array; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import com.naef.jnlua.JavaReflector.Metamethod;
} else { String interfaceName = luaState.checkString(i + 2); interfaces[i] = loadType(luaState, interfaceName); } } // Create proxy luaState.pushJavaObjectRaw(luaState.getProxy(1, interfaces)); return 1; } @Override public String getName() { return "proxy"; } }...
// Path: src/main/java/com/naef/jnlua/JavaReflector.java // public enum Metamethod { // /** // * <code>__index</code> metamethod. // */ // INDEX, // // /** // * <code>__newindex</code> metamethod. // */ // NEWINDEX, // // /** // * <code>__len</code> metamethod. // */ // LEN, // // ...
luaState.toJavaObjectRaw(1), Metamethod.PAIRS);
buksy/jnlua
src/main/java/com/naef/jnlua/LuaState.java
// Path: src/main/java/com/naef/jnlua/JavaReflector.java // public enum Metamethod { // /** // * <code>__index</code> metamethod. // */ // INDEX, // // /** // * <code>__newindex</code> metamethod. // */ // NEWINDEX, // // /** // * <code>__len</code> metamethod. // */ // LEN, // // ...
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.lang.ref.PhantomReference; import java.lang.ref.ReferenceQueue; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; impo...
* @see #getClassLoader() * @see #setClassLoader(ClassLoader) * @see #getJavaReflector() * @see #setJavaReflector(JavaReflector) * @see #getConverter() * @see #setConverter(Converter) */ public LuaState() { this(0L); } /** * Creates a new instance. */ private LuaState(long luaState...
// Path: src/main/java/com/naef/jnlua/JavaReflector.java // public enum Metamethod { // /** // * <code>__index</code> metamethod. // */ // INDEX, // // /** // * <code>__newindex</code> metamethod. // */ // NEWINDEX, // // /** // * <code>__len</code> metamethod. // */ // LEN, // // ...
for (int i = 0; i < JavaReflector.Metamethod.values().length; i++) {
TinkerPatch/tinkerpatch-sdk
tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/utils/VersionUtils.java
// Path: tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/client/TinkerClientAPI.java // public static final String TAG = "Tinker.ClientImpl";
import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.Properties; import java.util.Random; import java.util.UUID; import static com.tencent.tinker.server.client.TinkerClientAPI.TAG; import android.content.Context; import com.tencent.tinker.lib...
/* * The MIT License (MIT) * * Copyright (c) 2016 Shengjie Sim Sun * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to ...
// Path: tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/client/TinkerClientAPI.java // public static final String TAG = "Tinker.ClientImpl"; // Path: tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/utils/VersionUtils.java import java.io.File; import java.io.FileInputStream; import java.io.FileOutputS...
TinkerLog.d(TAG, "isInGrayGroup return %b, gray value:%d and my gray value is %d", result, gray, grayValue);
TinkerPatch/tinkerpatch-sdk
tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/model/request/BaseReport.java
// Path: tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/utils/ServerUtils.java // public final class ServerUtils { // public static final String CHARSET = "UTF-8"; // public static final int BUFFER_SIZE = 4096; // public static final String TINKER_SERVER_DIR = "tinker_serve...
import java.net.URLEncoder; import java.util.HashMap; import java.util.Map; import com.tencent.tinker.lib.util.TinkerLog; import com.tencent.tinker.server.utils.ServerUtils; import org.json.JSONException; import org.json.JSONObject;
jsonObject.put("av", appVersion); jsonObject.put("pv", patchVersion); jsonObject.put("t", platformType); return jsonObject; } protected HashMap<String, String> toEncodeObject() { HashMap<String, String> values = new HashMap<>(); values.put("k", appKey); v...
// Path: tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/utils/ServerUtils.java // public final class ServerUtils { // public static final String CHARSET = "UTF-8"; // public static final int BUFFER_SIZE = 4096; // public static final String TINKER_SERVER_DIR = "tinker_serve...
result.append(URLEncoder.encode(entry.getKey(), ServerUtils.CHARSET));
TinkerPatch/tinkerpatch-sdk
tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/TinkerPatch.java
// Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/ConfigRequestCallback.java // public interface ConfigRequestCallback { // void onSuccess(HashMap<String, String> configs); // void onFail(Exception e); // } // // Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/R...
import com.tencent.tinker.lib.util.TinkerLog; import com.tencent.tinker.loader.app.ApplicationLike; import com.tinkerpatch.sdk.server.callback.ConfigRequestCallback; import com.tinkerpatch.sdk.server.callback.RollbackCallBack; import com.tinkerpatch.sdk.tinker.callback.ResultCallBack;
/* * The MIT License (MIT) * * Copyright (c) 2013-2016 Shengjie Sim Sun * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights ...
// Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/ConfigRequestCallback.java // public interface ConfigRequestCallback { // void onSuccess(HashMap<String, String> configs); // void onFail(Exception e); // } // // Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/R...
public TinkerPatch fetchDynamicConfig(final ConfigRequestCallback configRequestCallback,
TinkerPatch/tinkerpatch-sdk
tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/TinkerPatch.java
// Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/ConfigRequestCallback.java // public interface ConfigRequestCallback { // void onSuccess(HashMap<String, String> configs); // void onFail(Exception e); // } // // Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/R...
import com.tencent.tinker.lib.util.TinkerLog; import com.tencent.tinker.loader.app.ApplicationLike; import com.tinkerpatch.sdk.server.callback.ConfigRequestCallback; import com.tinkerpatch.sdk.server.callback.RollbackCallBack; import com.tinkerpatch.sdk.tinker.callback.ResultCallBack;
} /** * 设置访问后台补丁包更新配置的时间间隔,默认为3个小时 * * @param hours * @return */ public TinkerPatch setFetchPatchIntervalByHours(int hours) { return null; } /** * 设置补丁合成成功后,是否通过锁屏重启程序,这样可以加快补丁的生效时间 * 默认为false, 即等待应用自身重新启动时加载 * * @param restartOnScreenOff *...
// Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/ConfigRequestCallback.java // public interface ConfigRequestCallback { // void onSuccess(HashMap<String, String> configs); // void onFail(Exception e); // } // // Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/R...
public TinkerPatch setPatchResultCallback(ResultCallBack resultCallBack) {
TinkerPatch/tinkerpatch-sdk
tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/TinkerPatch.java
// Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/ConfigRequestCallback.java // public interface ConfigRequestCallback { // void onSuccess(HashMap<String, String> configs); // void onFail(Exception e); // } // // Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/R...
import com.tencent.tinker.lib.util.TinkerLog; import com.tencent.tinker.loader.app.ApplicationLike; import com.tinkerpatch.sdk.server.callback.ConfigRequestCallback; import com.tinkerpatch.sdk.server.callback.RollbackCallBack; import com.tinkerpatch.sdk.tinker.callback.ResultCallBack;
} /** * 我们可以通过ResultCallBack设置对合成后的回调 * 例如我们也可以不锁屏,而是在这里通过弹框咨询用户等方式 * * @param resultCallBack * @return */ public TinkerPatch setPatchResultCallback(ResultCallBack resultCallBack) { return null; } /** * 设置收到后台回退要求时,是否在锁屏时清除补丁 * 默认为false,即等待应用下一次重新启动时...
// Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/ConfigRequestCallback.java // public interface ConfigRequestCallback { // void onSuccess(HashMap<String, String> configs); // void onFail(Exception e); // } // // Path: tinkerpatch-sdk/src/main/java/com/tinkerpatch/sdk/server/callback/R...
public TinkerPatch setPatchRollBackCallback(RollbackCallBack rollbackCallBack) {
TinkerPatch/tinkerpatch-sdk
tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/utils/Conditions.java
// Path: tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/client/TinkerClientAPI.java // public static final String TAG = "Tinker.ClientImpl";
import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Stack; import java.util.regex.Pattern; import static c...
/* * The MIT License (MIT) * * Copyright (c) 2016 Shengjie Sim Sun * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to ...
// Path: tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/client/TinkerClientAPI.java // public static final String TAG = "Tinker.ClientImpl"; // Path: tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/utils/Conditions.java import java.io.FileOutputStream; import java.io.IOException; import java.io.Objec...
TinkerLog.e(TAG, "parse conditions error(have you written '==' as '='?): " + rules, ignore);
TinkerPatch/tinkerpatch-sdk
tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/model/TinkerClientUrl.java
// Path: tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/utils/Preconditions.java // public final class Preconditions { // // private Preconditions() { // // TinkerServerUtils class. // } // // public static void checkArgument(boolean expression, String message) { // if (!expressio...
import java.net.URL; import java.util.HashMap; import java.util.Map; import android.net.Uri; import android.text.TextUtils; import com.tencent.tinker.server.utils.Preconditions; import java.net.MalformedURLException;
/* * The MIT License (MIT) * * Copyright (c) 2016 Shengjie Sim Sun * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to ...
// Path: tinkerpatch-sdk/src/main/java/com/tencent/tinker/server/utils/Preconditions.java // public final class Preconditions { // // private Preconditions() { // // TinkerServerUtils class. // } // // public static void checkArgument(boolean expression, String message) { // if (!expressio...
this.stringUrl = Preconditions.checkNotEmpty(stringUrl);
USCDataScience/AgePredictor
age-predictor-cli/src/main/java/edu/usc/irds/agepredictor/spark/authorage/AgeClassifyContextGeneratorWrapper.java
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/util/featuregen/BagOfWordsFeatureGenerator.java // public class BagOfWordsFeatureGenerator implements FeatureGenerator { // // public static final BagOfWordsFeatureGenerator INSTANCE = new BagOfWordsFeatureGenerator(); // // private static List<St...
import java.io.Serializable; import opennlp.tools.tokenize.Tokenizer; import opennlp.tools.tokenize.WhitespaceTokenizer; import opennlp.tools.util.ext.ExtensionLoader; import opennlp.tools.util.featuregen.BagOfWordsFeatureGenerator; import opennlp.tools.util.featuregen.FeatureGenerator;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/util/featuregen/BagOfWordsFeatureGenerator.java // public class BagOfWordsFeatureGenerator implements FeatureGenerator { // // public static final BagOfWordsFeatureGenerator INSTANCE = new BagOfWordsFeatureGenerator(); // // private static List<St...
public FeatureGenerator[] getFeatureGenerators() {
USCDataScience/AgePredictor
age-predictor-cli/src/main/java/edu/usc/irds/agepredictor/spark/authorage/AgeClassifyContextGeneratorWrapper.java
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/util/featuregen/BagOfWordsFeatureGenerator.java // public class BagOfWordsFeatureGenerator implements FeatureGenerator { // // public static final BagOfWordsFeatureGenerator INSTANCE = new BagOfWordsFeatureGenerator(); // // private static List<St...
import java.io.Serializable; import opennlp.tools.tokenize.Tokenizer; import opennlp.tools.tokenize.WhitespaceTokenizer; import opennlp.tools.util.ext.ExtensionLoader; import opennlp.tools.util.featuregen.BagOfWordsFeatureGenerator; import opennlp.tools.util.featuregen.FeatureGenerator;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/util/featuregen/BagOfWordsFeatureGenerator.java // public class BagOfWordsFeatureGenerator implements FeatureGenerator { // // public static final BagOfWordsFeatureGenerator INSTANCE = new BagOfWordsFeatureGenerator(); // // private static List<St...
FeatureGenerator[] def = { new BagOfWordsFeatureGenerator()};
USCDataScience/AgePredictor
age-predictor-cli/src/main/java/edu/usc/irds/agepredictor/spark/authorage/AgeClassifySparkEvaluator.java
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/authorage/AgeClassifyME.java // public class AgeClassifyME { // protected AgeClassifyContextGenerator contextGenerator; // // private AgeClassifyFactory factory; // private AgeClassifyModel model; // // public AgeClassifyME(AgeClassify...
import scala.Tuple2; import java.io.File; import java.io.IOException; import java.util.List; import org.apache.spark.SparkConf; import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api.java.JavaSparkContext; import org.apache.spark.api.java.function.Function; i...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/authorage/AgeClassifyME.java // public class AgeClassifyME { // protected AgeClassifyContextGenerator contextGenerator; // // private AgeClassifyFactory factory; // private AgeClassifyModel model; // // public AgeClassifyME(AgeClassify...
AgeClassifyME classifier = this.wrapper.getClassifier();
USCDataScience/AgePredictor
age-predictor-cli/src/main/java/edu/usc/irds/agepredictor/cmdline/authorage/AgeClassifyFineGrainedReportListener.java
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/authorage/AuthorAgeSample.java // public class AuthorAgeSample implements Serializable{ // private static final long serialVersionUID = 5374409234122582256L; // // public static final String FORMAT_NAME = "authorage"; // // private final String ageCatego...
import java.io.OutputStream; import java.io.PrintStream; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/authorage/AuthorAgeSample.java // public class AuthorAgeSample implements Serializable{ // private static final long serialVersionUID = 5374409234122582256L; // // public static final String FORMAT_NAME = "authorage"; // // private final String ageCatego...
public void missclassified(AuthorAgeSample reference, AuthorAgeSample prediction) {
USCDataScience/AgePredictor
age-predictor-opennlp/src/main/java/opennlp/tools/authorage/AgeClassifyFactory.java
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/util/featuregen/BagOfWordsFeatureGenerator.java // public class BagOfWordsFeatureGenerator implements FeatureGenerator { // // public static final BagOfWordsFeatureGenerator INSTANCE = new BagOfWordsFeatureGenerator(); // // private static List<St...
import opennlp.tools.tokenize.Tokenizer; import opennlp.tools.tokenize.WhitespaceTokenizer; import opennlp.tools.util.BaseToolFactory; import opennlp.tools.util.InvalidFormatException; import opennlp.tools.util.ext.ExtensionLoader; import opennlp.tools.util.featuregen.BagOfWordsFeatureGenerator; import opennlp.tools.ut...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/util/featuregen/BagOfWordsFeatureGenerator.java // public class BagOfWordsFeatureGenerator implements FeatureGenerator { // // public static final BagOfWordsFeatureGenerator INSTANCE = new BagOfWordsFeatureGenerator(); // // private static List<St...
private FeatureGenerator[] featureGenerators; // Defaults to just getting unigrams
USCDataScience/AgePredictor
age-predictor-opennlp/src/main/java/opennlp/tools/authorage/AgeClassifyFactory.java
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/util/featuregen/BagOfWordsFeatureGenerator.java // public class BagOfWordsFeatureGenerator implements FeatureGenerator { // // public static final BagOfWordsFeatureGenerator INSTANCE = new BagOfWordsFeatureGenerator(); // // private static List<St...
import opennlp.tools.tokenize.Tokenizer; import opennlp.tools.tokenize.WhitespaceTokenizer; import opennlp.tools.util.BaseToolFactory; import opennlp.tools.util.InvalidFormatException; import opennlp.tools.util.ext.ExtensionLoader; import opennlp.tools.util.featuregen.BagOfWordsFeatureGenerator; import opennlp.tools.ut...
String[] classes = classNames.split(","); FeatureGenerator[] features = new FeatureGenerator[classes.length]; for (int i = 0; i < classes.length; i++) { /* Class ext = Class.forName(classes[i]); Field instance = ext.getDeclaredField("INSTANCE"); System.out.println(instance.toString()); ...
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/util/featuregen/BagOfWordsFeatureGenerator.java // public class BagOfWordsFeatureGenerator implements FeatureGenerator { // // public static final BagOfWordsFeatureGenerator INSTANCE = new BagOfWordsFeatureGenerator(); // // private static List<St...
FeatureGenerator[] def = { BagOfWordsFeatureGenerator.INSTANCE };
USCDataScience/AgePredictor
age-predictor-cli/src/main/java/edu/usc/irds/agepredictor/spark/authorage/CreateEvents.java
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/util/featuregen/FeatureGenerator.java // public interface FeatureGenerator { // // /** // * Extract features from given text fragments // * // * @param text the text fragments to extract features from // * @param extraInform...
import opennlp.tools.util.featuregen.FeatureGenerator; import java.util.Collection; import java.util.LinkedList; import org.apache.spark.api.java.function.Function;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: age-predictor-opennlp/src/main/java/opennlp/tools/util/featuregen/FeatureGenerator.java // public interface FeatureGenerator { // // /** // * Extract features from given text fragments // * // * @param text the text fragments to extract features from // * @param extraInform...
FeatureGenerator[] featureGenerators = this.wrapper.getFeatureGenerators();
Tyde/TuCanMobile
app/src/main/java/com/dalthed/tucan/ui/ApplyEvent.java
// Path: app/src/main/java/com/dalthed/tucan/Connection/AnswerObject.java // public class AnswerObject { // private String HTML_text; // private String redirectURL; // private String lastcalledURL; // private CookieManager Cookies; // /** // * RückgabeObjekt der BrowseMethods // * @param HTML HTML-Code // * ...
import android.os.Bundle; import com.dalthed.tucan.Connection.AnswerObject; import com.dalthed.tucan.util.ConfigurationChangeStorage;
/** * This file is part of TuCan Mobile. * * TuCan Mobile is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * TuCan Mobile is d...
// Path: app/src/main/java/com/dalthed/tucan/Connection/AnswerObject.java // public class AnswerObject { // private String HTML_text; // private String redirectURL; // private String lastcalledURL; // private CookieManager Cookies; // /** // * RückgabeObjekt der BrowseMethods // * @param HTML HTML-Code // * ...
public void onPostExecute(AnswerObject result) {