Permalink
Browse files

More refactoring

  • Loading branch information...
djspiewak committed Apr 3, 2008
1 parent ce2844a commit d40bbc62c54663ea20ff96f547357ab45bd64e5c
@@ -29,7 +29,7 @@ public Parser() {
}
private final void addType(Class<? extends Value<?>> type) {
valueTypes.put(type.getAnnotation(Prefix.class).value(), type);
valueTypes.put(type.getAnnotation(ValuePrefix.class).value(), type);
}
public Class<? extends Value<?>> getValueType(byte b) {
@@ -13,6 +13,6 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Prefix {
public @interface ValuePrefix {
byte value();
}
@@ -7,12 +7,12 @@
import java.io.InputStream;
import com.googlecode.jbencode.Parser;
import com.googlecode.jbencode.Prefix;
import com.googlecode.jbencode.ValuePrefix;
/**
* @author Daniel Spiewak
*/
@Prefix('d')
@ValuePrefix('d')
public class DictionaryValue extends CompositeValue<DictionaryValue, EntryValue> {
private EntryValue previous;
@@ -7,13 +7,13 @@
import java.io.InputStream;
import com.googlecode.jbencode.Parser;
import com.googlecode.jbencode.Prefix;
import com.googlecode.jbencode.Value;
import com.googlecode.jbencode.ValuePrefix;
/**
* @author Daniel Spiewak
*/
@Prefix('l')
@ValuePrefix('l')
public class ListValue extends CompositeValue<ListValue, Value<?>> {
public ListValue(Parser parser, InputStream is) {
@@ -7,13 +7,13 @@
import java.io.InputStream;
import com.googlecode.jbencode.Parser;
import com.googlecode.jbencode.Prefix;
import com.googlecode.jbencode.Value;
import com.googlecode.jbencode.ValuePrefix;
/**
* @author Daniel Spiewak
*/
@Prefix('i')
@ValuePrefix('i')
public class IntegerValue implements Value<Long> {
private final InputStream is;

0 comments on commit d40bbc6

Please sign in to comment.