Source stringclasses 1
value | Date int32 2.01k 2.01k | Text stringlengths 3 15.9M | Token_count int32 1 2.44M |
|---|---|---|---|
github-java-corpus | 2,012 | package test.gcom;
import static org.junit.Assert.*;
import java.io.IOException;
import java.rmi.AlreadyBoundException;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import gcom.GCom;
import gcom.GroupDefinition;
import... | 758 |
github-java-corpus | 2,012 | package test.gcom;
import static org.junit.Assert.*;
import gcom.Member;
import org.junit.Before;
import org.junit.Test;
public class MemberTest {
private Member member;
@Before
public void setUp() {
member = new Member("123", "test");
}
@Test
public void testGetID() {
String id = member.getID();
a... | 179 |
github-java-corpus | 2,012 | package test.gcom;
import static org.junit.Assert.*;
import java.io.Serializable;
import gcom.BasicCommunicationModule;
import gcom.HashVectorClock;
import gcom.interfaces.*;
import org.junit.Before;
import org.junit.Test;
public class BasicCommunicationModuleTest {
Group group;
MessageOrderingMockup mom;
Basic... | 501 |
github-java-corpus | 2,012 | package test.rmi;
import gcom.interfaces.DebugInterface;
import static org.junit.Assert.*;
import rmi.*;
import gcom.Member;
import gcom.interfaces.CommunicationModule;
import gcom.Message;
import gcom.interfaces.MessageListener;
import gcom.interfaces.Message.TYPE_MESSAGE;
import gcom.interfaces.GComMessageListener;... | 1,199 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* DebugUI.java
*
* Created on Oct 26, 2009, 9:00:30 AM
*/
package gui;
import gcom.Debug;
import gcom.HashVectorClock;
import gcom.ReliableCommunicationModule;
import gcom.interfaces.DebugInterface;
import gcom... | 2,565 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* GUIView.java
*
* Created on Oct 25, 2009, 4:13:30 PM
*/
package gui;
import gcom.interfaces.*;
import gcom.Debug;
import java.awt.event.KeyEvent;
import java.io.IOException;
import java.rmi.AlreadyBoundExcept... | 10,229 |
github-java-corpus | 2,012 | package gui;
import gcom.Debug;
import java.util.Vector;
import javax.swing.AbstractListModel;
public class MockListModel<T> extends AbstractListModel {
private Vector<T> model;
public MockListModel(Vector<T> model) {
this.model = model;
}
@Override
public int getSize() {
return model.size();
}
@Overrid... | 264 |
github-java-corpus | 2,012 | /*
* GroupPanel.java
*/
package gui;
import gcom.Debug;
import gcom.interfaces.*;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.util.Date;
import java.util.Vector;
import javax.swing.DefaultListModel;
import javax.swing.JTa... | 1,494 |
github-java-corpus | 2,012 | package com.creal.geo;
import java.util.ArrayList;
import javax.media.opengl.GL;
import codeanticode.glgraphics.GLGraphics;
import codeanticode.glgraphics.GLModel;
import codeanticode.glgraphics.GLSLShader;
import codeanticode.glgraphics.GLTexture;
import com.*;
import com.creal.trace.Main;
import processing.core.... | 3,955 |
github-java-corpus | 2,012 | package com.creal.geo;
import java.util.List;
import java.util.Vector;
import toxi.geom.Spline3D;
import toxi.geom.Vec3D;
import com.creal.trace.Main;
/**
* A connection is drawn between two geolocations.
*
* @author cmichi
*/
public class Connection {
private Main p;
/** start, destination coordinates */
... | 1,300 |
github-java-corpus | 2,012 | package com.creal.geo;
import com.creal.trace.Main;
import processing.core.PConstants;
/**
*
* @author michi
*/
public class Coordinate {
private float earthTextureWidth = 1350.0f;
private float earthTextureHeight = 675.0f;
public double y;
public double x;
public double lon;
public double lat;
char di... | 972 |
github-java-corpus | 2,012 | package com.creal.geo;
import com.*;
import com.creal.trace.Main;
/**
* Class is currently not in use,
* you can use it to put Markers on the Earth.
*
* Use like:
*
* setup():
* Coordinate greenwhich = new Coordinate(51, "W", 1, "E");
* Coordinate san_francisco = new Coordinate(37, "N", 122, "W");
* Co... | 332 |
github-java-corpus | 2,012 | package com.creal.trace;
import java.util.Collection;
import com.creal.geo.Coordinate;
/**
* A parsed traceroute line results in a {@see TraceResult} instance. This class
* contains the output in a schematic, easy accesible form.
*
* @author cmichi
*/
public class TraceResult {
public Collection<String> pingT... | 205 |
github-java-corpus | 2,012 | package com.creal.trace;
import java.io.IOException;
import java.util.List;
import java.util.Properties;
import java.util.Vector;
import javax.media.opengl.GL;
import codeanticode.glgraphics.GLConstants;
import codeanticode.glgraphics.GLGraphics;
import com.creal.geo.Connection;
import com.creal.geo.Earth;
import ... | 1,077 |
github-java-corpus | 2,012 | package com.creal.trace;
import com.*;
import java.util.Vector;
import controlP5.Range;
import controlP5.Textlabel;
/**
* Class for control objects.
*
* @author cmichi
*/
public class Control {
private Main p;
/** align all controls to this x */
public final int x = 40;
/** current y for placing contro... | 696 |
github-java-corpus | 2,012 | package com.creal.trace;
import com.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.creal.geo.Connection;
import com.creal.geo.Coordinate;... | 1,238 |
github-java-corpus | 2,012 | package com.maxmind.geoip;
public class Region{
public String countryCode;
public String countryName;
public String region;
}
| 28 |
github-java-corpus | 2,012 | /**
* DatabaseInfo.java
*
* Copyright (C) 2003 MaxMind LLC. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your ... | 898 |
github-java-corpus | 2,012 | /**
* LookupService.java
*
* Copyright (C) 2003 MaxMind LLC. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your... | 9,173 |
github-java-corpus | 2,012 | /**
* Location.java
*
* Copyright (C) 2004 MaxMind LLC. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Lesser Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your opti... | 476 |
github-java-corpus | 2,012 | /**
* Country.java
*
* Copyright (C) 2003 MaxMind LLC. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your optio... | 356 |
github-java-corpus | 2,012 | package com.maxmind.geoip;
// generated automatically from admin/generate_regionName.pl
public class regionName {
static public String regionNameByCode(String country_code,String region_code) {
String name = null;
int region_code2 = -1;
if (region_code == null) { return null; }
if (region_code.equals(""... | 74,708 |
github-java-corpus | 2,012 | package com.maxmind.geoip;
// generated automatically from admin/generate_timeZone.pl
public class timeZone {
static public String timeZoneByCountryAndRegion(String country,String region) {
String timezone = null;
if (country == null) {
return null;
}
if (region == null) {
region = "";
... | 16,298 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
import com.fasterxml.util.membuf.base.BytesSegment;
import com.fasterxml.util.membuf.base.StreamyMemBufferBase;
/**
* Byte-valued {@link StreamyMemBuffer}: memory buffer that stores sequence
* of bytes without preserving boundaries between different appends
* (that is, contents o... | 1,264 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.base;
/**
* Intermediate base class for {@link Segment}s used to store
* byte sequence values.
*/
public abstract class BytesSegment extends SegmentBase<BytesSegment>
{
/*
/**********************************************************************
/* Byte-specific API: read... | 366 |
github-java-corpus | 2,012 | /**
Intermediate typed base classes that offer partial implementations
of API types and/or refinements, but do not fully implement them.
*/
package com.fasterxml.util.membuf.base;
| 34 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.base;
import com.fasterxml.util.membuf.*;
/**
* Intermediate base class for {@link SegmentAllocator}s
* that construct {@link Segment}s that store byte sequences.
*/
public abstract class SegmentAllocatorBase<S extends Segment<S>>
extends SegmentAllocator<S>
{
/**
* A... | 927 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.base;
import com.fasterxml.util.membuf.*;
/**
* Shared base class for all types of {@link MemBuffer} implementations
* (regardless of underlying content type or streaming/chunked style)
*/
public abstract class MemBufferBase<S extends Segment<S>>
implements MemBuffer // partia... | 2,635 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.base;
/**
* Intermediate base class for {@link Segment}s used to store
* long-valued sequences.
*/
public abstract class LongsSegment extends SegmentBase<LongsSegment>
{
/*
/**********************************************************************
/* long-specific API: rea... | 337 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.base;
import com.fasterxml.util.membuf.Segment;
/**
* Shared base class for {@link Segment} implementations
*/
public abstract class SegmentBase<S extends Segment<S>>
extends Segment<S>
{
/**
* Let's not allow using segments shorter than 8 values; partly
* to ensu... | 766 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.base;
import com.fasterxml.util.membuf.*;
/**
* Intermediate mem buffer base class used for building type-specifc
* "chunky" buffers, buffers where sequences of primitive values
* are grouped into distinct entries such that all appends and reads
* are entry by entry in FIFO order... | 333 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.base;
import com.fasterxml.util.membuf.ChunkyMemBuffer;
import com.fasterxml.util.membuf.MemBuffer;
import com.fasterxml.util.membuf.Segment;
import com.fasterxml.util.membuf.SegmentAllocator;
import com.fasterxml.util.membuf.StreamyMemBuffer;
/*
* Copyright Tatu Saloranta, 2011-
*... | 1,116 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.base;
import com.fasterxml.util.membuf.*;
/**
* Intermediate mem buffer base class used for building type-specifc
* "streamy" buffers.
*/
public abstract class StreamyMemBufferBase<S extends Segment<S>>
extends MemBufferBase<S>
implements StreamyMemBuffer
{
/*
/***... | 381 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
import java.io.*;
/*
* Copyright Tatu Saloranta, 2011-
*/
/**
* Class that defines generic memory buffer interface.
* Memory buffers are extendable linear FIFO data structures.
* Since this base type does not expose all access (mostly because
* generic typing does not work fo... | 995 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.impl;
import java.nio.ByteBuffer;
import java.nio.LongBuffer;
import com.fasterxml.util.membuf.Segment;
import com.fasterxml.util.membuf.SegmentAllocator;
import com.fasterxml.util.membuf.base.*;
/**
* {@link Segment} implementation that uses {@link LongBuffer}s for
* storing data... | 1,457 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.impl;
import com.fasterxml.util.membuf.*;
import com.fasterxml.util.membuf.base.BytesSegment;
/**
* {@link StreamyBytesMemBuffer} implementation used for storing a sequence
* of byte values in a single byte sequence which does not retain
* boundaries implied by appends (as per {@l... | 2,332 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.impl;
import com.fasterxml.util.membuf.*;
import com.fasterxml.util.membuf.base.LongsSegment;
/**
* {@link MemBuffer} implementation used for storing entries
* that are sequences of long values.
*<p>
* Access to queue is fully synchronized -- meaning that all methods are
* synch... | 3,089 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.impl;
import com.fasterxml.util.membuf.SegmentAllocator;
import com.fasterxml.util.membuf.base.*;
/**
* {@link LongsSegment} implementation that uses POJAs (Plain Old Java Array)
* for storing long sequences.
*/
public class ArrayLongsSegment extends LongsSegment
{
protected f... | 1,174 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.impl;
import java.nio.ByteBuffer;
import com.fasterxml.util.membuf.*;
import com.fasterxml.util.membuf.base.BytesSegment;
import com.fasterxml.util.membuf.base.SegmentAllocatorBase;
/**
* {@link Segment} implementation that uses {@link ByteBuffer}s for
* storing data.
* Basically... | 1,746 |
github-java-corpus | 2,012 | /**
Package that contains implementations of the API classes.
*/
package com.fasterxml.util.membuf.impl;
| 19 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.impl;
import com.fasterxml.util.membuf.*;
import com.fasterxml.util.membuf.base.BytesSegment;
/**
* {@link ChunkyBytesMemBuffer} implementation used for storing entries
* that are sequences of byte values, and are stored as distinct entries
* with definite size (as per {@link Chun... | 3,669 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.impl;
import com.fasterxml.util.membuf.*;
import com.fasterxml.util.membuf.base.LongsSegment;
/**
* {@link StreamyBytesMemBuffer} implementation used for storing a sequence
* of long values in a single long sequence which does not retain
* boundaries implied by appends (as per {@l... | 2,305 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.impl;
import com.fasterxml.util.membuf.SegmentAllocator;
import com.fasterxml.util.membuf.base.BytesSegment;
import com.fasterxml.util.membuf.base.SegmentAllocatorBase;
/**
* {@link BytesSegment} implementation that uses POJAs (Plain Old Java Array)
* for storing byte sequences.
*... | 1,606 |
github-java-corpus | 2,012 | /**
Package that contains public API of the the library.
<p>
For full usage, check out
<a href="https://github.com/cowtowncoder/low-gc-membuffers">project home</a>,
but here is an example of simple usage:
<p>
First thing you need is a factory to create {@link MemBuffer} instance you want.
Buffers come in multiple flav... | 598 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
/**
* Generic type for {@link MemBuffer}s that store data as chunks:
* sequences of primitive types with length, so that each read
* will read exact sequence of values that was appended.
*<p>
* Note that most actual read and append methods are defined in
* type-specific subtype... | 330 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
import com.fasterxml.util.membuf.base.BytesSegment;
import com.fasterxml.util.membuf.base.ChunkyMemBufferBase;
/**
* {@link ChunkyMemBuffer} for buffering byte sequences.
*/
public abstract class ChunkyBytesMemBuffer extends ChunkyMemBufferBase<BytesSegment>
{
/**
* Segme... | 1,934 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
import com.fasterxml.util.membuf.base.BytesSegment;
import com.fasterxml.util.membuf.base.MemBuffersBase;
import com.fasterxml.util.membuf.impl.ByteBufferBytesSegment;
import com.fasterxml.util.membuf.impl.ChunkyBytesMemBufferImpl;
import com.fasterxml.util.membuf.impl.StreamyBytesMe... | 524 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
import com.fasterxml.util.membuf.base.LongsSegment;
import com.fasterxml.util.membuf.base.ChunkyMemBufferBase;
public abstract class ChunkyLongsMemBuffer extends ChunkyMemBufferBase<LongsSegment>
{
/**
* Segment that was peeked, if any. When entries are peeked, a copy
... | 2,140 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
/**
* Generic type for {@link MemBuffer}s that store data as contiguous
* sequence of primitive values,
* so units of appending and reading do not necessarily match.
* This is similar to JDK stream abstraction.
*<p>
* Note that most actual read and append methods are defined in... | 206 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
/*
* Copyright Tatu Saloranta, 2011-
*/
/**
* Core definition of containers for individual segments that form physical
* storage level of the logical queue.
* Note that at this level we don't yet know either physical primitive type
* used under the hood (from byte to long) or ... | 784 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
import com.fasterxml.util.membuf.base.*;
import com.fasterxml.util.membuf.impl.ByteBufferLongsSegment;
import com.fasterxml.util.membuf.impl.ChunkyLongsMemBufferImpl;
import com.fasterxml.util.membuf.impl.StreamyLongsMemBufferImpl;
/**
* Factory for creating {@link ChunkyBytesMemBu... | 525 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
/*
* Copyright Tatu Saloranta, 2011-
*/
/**
* Shared allocator object, used by standardl {@link MemBuffer} implementations.
* Handles allocation of new {@link Segment} instances, as well as sharing of
* reusable segments (above and beyond simple reuse that individual
* buffers... | 870 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
import com.fasterxml.util.membuf.base.LongsSegment;
import com.fasterxml.util.membuf.base.StreamyMemBufferBase;
/**
* Long-valued {@link StreamyMemBuffer}: memory buffer that stores sequence
* of longs without preserving boundaries between different appends
* (that is, contents o... | 1,305 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.longs;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.junit.Assert;
import com.fasterxml.util.membuf.*;
public cla... | 1,965 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.longs;
import org.junit.Assert;
import com.fasterxml.util.membuf.*;
/**
* Test for peeking contents of a chunky long-valued buffer.
* Note: no matching functionality for streamy buffers
*/
public class PeekChunkyLongsTest extends MembufTestBase
{
public void testSimplePeeks() ... | 562 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.longs;
import com.fasterxml.util.membuf.*;
public class SkipLongsTest extends MembufTestBase
{
public void testChunkySkips() throws Exception
{
_testChunkySkips(SegType.BYTE_ARRAY);
_testChunkySkips(SegType.BYTE_BUFFER_FAKE);
_testChunkySkips(SegType.B... | 1,571 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.longs;
import java.util.Arrays;
import org.junit.Assert;
import com.fasterxml.util.membuf.*;
/**
* Tests to verify handling of case where memory buffers are filled up,
* for both chunky and streamy byte-valued memory buffers.
*/
public class FullLongsBufferTest extends MembufTes... | 1,958 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.longs;
import org.junit.Assert;
import com.fasterxml.util.membuf.*;
/**
* Tests for testing both chunky and streamy long-valued memory buffers for
* basic append and read combinations.
*/
public class AppendReadLongsTest extends MembufTestBase
{
public void testSimpleAppendAn... | 2,530 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.longs;
import org.junit.Assert;
import com.fasterxml.util.membuf.*;
/**
* Unit test that uses a sample file, sending all entries, one by
* one (buffering all), then reading one-by-one and verifying
* results.
*/
public class LongerChunkyLongsTest extends MembufTestBase
{
pub... | 1,004 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.bytes;
import java.util.Arrays;
import org.junit.Assert;
import com.fasterxml.util.membuf.*;
/**
* Tests to verify handling of case where memory buffers are filled up,
* for both chunky and streamy byte-valued memory buffers.
*/
public class FullBytesBufferTest extends MembufTes... | 1,949 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.bytes;
import java.io.*;
import java.nio.charset.Charset;
import java.util.*;
import org.junit.Assert;
import com.fasterxml.util.membuf.*;
import com.fasterxml.util.membuf.impl.ChunkyBytesMemBufferImpl;
/**
* Unit test that uses a sample file, sending all entries, one by
* one (b... | 2,043 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.bytes;
import java.io.*;
import java.nio.charset.Charset;
import java.util.*;
import org.junit.Assert;
import com.fasterxml.util.membuf.*;
/**
* Unit test copied from matching bytes-test; simply coerces bytes
* to longs, which should work ok, if not perfectly...
*/
public class ... | 2,028 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.bytes;
import com.fasterxml.util.membuf.ChunkyBytesMemBuffer;
import com.fasterxml.util.membuf.StreamyBytesMemBuffer;
import com.fasterxml.util.membuf.MembufTestBase;
public class SkipBytesTest extends MembufTestBase
{
public void testChunkySkips() throws Exception
{
... | 1,596 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.bytes;
import org.junit.Assert;
import com.fasterxml.util.membuf.ChunkyBytesMemBuffer;
import com.fasterxml.util.membuf.MembufTestBase;
/**
* Test for peeking contents of a chunky byte-valued buffer.
* Note: no matching functionality for streamy buffers
*/
public class PeekChunky... | 574 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.bytes;
import org.junit.Assert;
import com.fasterxml.util.membuf.*;
/**
* Tests for testing both chunky and streamy byte-valued memory buffers for
* basic append and read combinations.
*/
public class AppendAndReadBytesTest extends MembufTestBase
{
public void testChunkyAppen... | 2,528 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.impl;
import com.fasterxml.util.membuf.MemBuffersForBytes;
import com.fasterxml.util.membuf.SegmentAllocator;
import com.fasterxml.util.membuf.impl.ChunkyBytesMemBufferImpl;
import com.fasterxml.util.membuf.MembufTestBase;
public class BufferCloseTest extends MembufTestBase
{
pu... | 421 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf.impl;
import com.fasterxml.util.membuf.MemBuffersForBytes;
import com.fasterxml.util.membuf.MembufTestBase;
import com.fasterxml.util.membuf.SegmentAllocator;
public class BufferReuseTest extends MembufTestBase
{
public void testGlobalReuseWithReads() throws Exception
{
... | 533 |
github-java-corpus | 2,012 | package com.fasterxml.util.membuf;
import java.util.Arrays;
import com.fasterxml.util.membuf.base.BytesSegment;
import com.fasterxml.util.membuf.base.LongsSegment;
import com.fasterxml.util.membuf.impl.*;
import junit.framework.TestCase;
public abstract class MembufTestBase extends TestCase
{
public enum SegTyp... | 1,104 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.ArrayList;
/**
* Mark an option that takes multple values... | 231 |
github-java-corpus | 2,012 | /**
* Annotations that defines command line syntax
*/
package org.cyclopsgroup.jcli.annotation; | 20 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* This annotation marks a property as non-option argument or arguments... | 178 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Type annotated with Cli is considered as a command where options and... | 195 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Option of command
*
* @author <a href="mailto:jiaqi.guo@gmail.com"... | 238 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang.Validate;
/**
* Argument validation result coming from {@link ArgumentProcessor#validate(String[])}
*/
public final class ValidationResult
{
/**
* A violation indi... | 541 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.example;
/**
* Enum used in example
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi Guo</a>
*/
public enum UserControlAction
{
/**
* Add something
*/
ADD,
/**
* Delete something
*/
DELETE,
/**
* Change something
*/
EDIT,
... | 99 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.example;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.cyclopsgroup.caff.conversion.DateField;
import org.cyclopsgroup.jcli.ArgumentProcessor;
import org.cyclopsgroup.jcli.annotation.Argument;
import org.cyclopsgroup.jcli... | 656 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.spi;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
* Data that comes from command arguments
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi Guo</a>
*/
public final class CommandLine
{
/**
* One entry... | 400 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.spi;
import java.util.List;
/**
* Implementation of this interface is aware of syntax of command arguments
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi Guo</a>
*/
public interface CommandLineParser
{
/**
* @param arguments List of arguments
* @param context... | 110 |
github-java-corpus | 2,012 | /**
* Service provider API for implementations
*/
package org.cyclopsgroup.jcli.spi; | 19 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.spi;
import java.util.Collection;
/**
* A builder class to create {@link CommandLine}
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi Guo</a>
*/
public final class CommandLineBuilder
{
private static final String FLAG_VALUE = Boolean.TRUE.toString();
private final ... | 518 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.spi;
import java.util.List;
/**
* Context for parsing arguments for given bean
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi Guo</a>
*/
public interface ParsingContext
{
/**
* @return Command line model
*/
Cli cli();
/**
* @return Argument mode... | 188 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.spi;
/**
* Model of argument definition
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi Guo</a>
*/
public interface Argument
{
/**
* @return Description of arguments
*/
String getDescription();
/**
* @return Displayable argument name in help page
... | 87 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.spi;
/**
* Model of a command line
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi Guo</a>
*/
public interface Cli
{
/**
* @return Description of command line
*/
String getDescription();
/**
* @return Name of command line
*/
String getNam... | 106 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.spi;
/**
* Meta data for an option
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi Guo</a>
*/
public interface Option
{
/**
* @return Implied value of option, NULL if not specified
*/
String getDefaultValue();
/**
* @return String description of t... | 221 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import org.cyclopsgroup.caff.conversion.Converter;
import org.cyclopsgroup.caff.ref.ValueReference;
class SingleValueReference<T>
extends Reference<T>
{
SingleValueReference( Class<? extends T> beanType, Converter<?> converter, ValueReference<T> ref, String longName )
{... | 161 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import org.cyclopsgroup.jcli.ArgumentProcessor;
import org.cyclopsgroup.jcli.ArgumentProcessorFactory;
import org.cyclopsgroup.jcli.spi.CommandLineParser;
/**
* Default implementation of {@link ArgumentProcessorFactory}
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi G... | 207 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import java.io.IOException;
import java.io.PrintWriter;
import org.apache.commons.lang.StringUtils;
import org.cyclopsgroup.caff.format.Format;
import org.cyclopsgroup.caff.format.Formats;
import org.cyclopsgroup.jcli.spi.Option;
class DefaultHelpPrinter
{
static <T> void prin... | 358 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import org.apache.commons.lang.StringUtils;
import org.cyclopsgroup.caff.format.FixLengthField;
import org.cyclopsgroup.caff.format.FixLengthType;
import org.cyclopsgroup.jcli.spi.Option;
/**
* An internal POJO to help printing out usage page
*
* @author <a href="mailto:jiaqi@cy... | 384 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.cyclopsgroup.caff.conversion.Converter;
import org.cyclopsgroup.caff.ref.ValueReference;
/**
* A reference to allow to set value as an attribute of bean
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi G... | 199 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import org.cyclopsgroup.jcli.annotation.Argument;
class AnnotationArgument
implements org.cyclopsgroup.jcli.spi.Argument
{
private Argument argument;
/**
* @param argument Argument annotation
*/
AnnotationArgument( Argument argument )
{
this.a... | 128 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import java.util.Collection;
import java.util.List;
import org.cyclopsgroup.caff.conversion.Converter;
import org.cyclopsgroup.caff.ref.ValueReference;
class MultiValueReference<T>
extends Reference<T>
{
private final Class<?> listType;
MultiValueReference( Class<? ex... | 309 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import org.cyclopsgroup.jcli.ArgumentProcessor;
import org.cyclopsgroup.jcli.ValidationResult;
import org.cyclopsgroup.jcli.spi.CommandLineParser;
import org.cyclopsgroup.jcli.spi.ParsingContext;
class ... | 329 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import org.cyclopsgroup.jcli.annotation.Cli;
/**
* Annotation based Cli implementation
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi Guo</a>
*/
class AnnotationCli
implements org.cyclopsgroup.jcli.spi.Cli
{
private final Cli cli;
private final boolean u... | 218 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.cyclopsgroup.jcli.spi.CommandLine;
import org.cyclopsgroup.jcli.spi.CommandLineParser;
class DefaultBeanProcessor
{
static <T> void process( AnnotationParsingContext<T... | 485 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.cyclopsgroup.jcli.annotation.Option;
class AnnotationOption
implements org.cyclopsgroup.jcli.spi.Option
{
private final boolean flag;
private final ... | 409 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.cyclopsgroup.jcli.spi.Argument;
import org.cyclopsgroup.jcli.spi.Cli;
import org.cyclopsgroup.jcli.spi.Option;
import org.cyclopsgroup.jcli.spi.ParsingContext;
class AnnotationParsingContext<T>
im... | 585 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli.impl;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util... | 954 |
github-java-corpus | 2,012 | /**
* General utilities used by jcli package
*/
package org.cyclopsgroup.jcli; | 20 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli;
import java.util.Iterator;
import java.util.ServiceLoader;
import org.cyclopsgroup.jcli.spi.CommandLineParser;
/**
* Factory class for {@link ArguemntProcessor}
*
* @author <a href="mailto:jiaqi@cyclopsgroup.org">Jiaqi Guo</a>
*/
public abstract class ArgumentProcessorFactory
{
... | 291 |
github-java-corpus | 2,012 | package org.cyclopsgroup.jcli;
import java.util.List;
/**
* Interface for CLI implementation that knows to suggest options
*
* @author <a href="mailto:jiaqi.guo@gmail.com">Jiaqi Guo</a>
*/
public interface AutoCompletable
{
/**
* Suggest candidates for an option with given partial input
*
* @... | 188 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.