Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Commit

Permalink
add new files
Browse files Browse the repository at this point in the history
  • Loading branch information
ttung committed Sep 10, 2014
1 parent 3466556 commit c060844
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright 2004-present Facebook. All Rights Reserved.

package com.instagram.common.json.annotation.processor;

public class StringUtil {

/**
* We don't want to pull in guava strings just for this one function.
*/
/*package*/ static boolean isNullOrEmpty(String string) {
return string == null || string.isEmpty();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright 2004-present Facebook. All Rights Reserved.

package com.instagram.common.json.annotation.processor.dependent;

import com.instagram.common.json.annotation.JsonField;
import com.instagram.common.json.annotation.JsonType;
import com.instagram.common.json.annotation.processor.parent.AbstractParentUUT;

/**
* UUT with abstract superclass.
*/
@JsonType
public class SubclassWithAbstractParentUUT extends AbstractParentUUT {
public static final String SUBCLASS_INT_KEY = "subclass_int";

@JsonField(fieldName = SUBCLASS_INT_KEY)
public int subclassInt;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2004-present Facebook. All Rights Reserved.

package com.instagram.common.json.annotation.processor.parent;

import com.instagram.common.json.annotation.JsonField;
import com.instagram.common.json.annotation.JsonType;

/**
* Abstract parent class to test that abstract parent classes are processed properly.
*/
@JsonType
public abstract class AbstractParentUUT {
public static final String PARENT_STRING_KEY = "parent_string";
public static final String PARENT_INT_KEY = "parent_int";

@JsonField(fieldName = PARENT_STRING_KEY)
public String parentString;

@JsonField(fieldName = PARENT_INT_KEY)
public int parentInt;
}

0 comments on commit c060844

Please sign in to comment.