Codota Logo
Field
Code IndexAdd Codota to your IDE (free)

How to use
Field
in
com.lzh.courier.annoapi

Best Java code snippets using com.lzh.courier.annoapi.Field (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: yjfnypeu/Courier

@Params(fields = {
    @Field(name = "admin", type = User.class),
    @Field(name = "listUser", type = User.class, fieldType = FieldType.list),
    @Field(name = "arrayUser", type = User.class, fieldType = FieldType.array),
    @Field(name = "setUser", type = User.class, fieldType = FieldType.set)
})
public class MultiTypeActivity extends Activity {

  @Bind(R.id.userInfos)
  TextView userInfos;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_multi_type);
    ButterKnife.bind(this);
    MultiTypeActivityArgsData arguments = MultiTypeActivityArgsData.getArguments(getIntent());
    StringBuffer buffer = new StringBuffer();
    buffer.append("admin:" + arguments.getAdmin())
        .append("\n")
        .append("listUser:" + arguments.getListUser())
        .append("\n")
        .append("arrsyUser:" + Arrays.toString(arguments.getArrayUser()));
    userInfos.setText(buffer.toString());
  }
}

origin: yjfnypeu/Courier

private TypeName getClzType (Field field) {
  TypeName typeName;
  try {
    Class<?> clazz = field.type();
    typeName = TypeName.get(clazz);
  } catch (MirroredTypeException mte) {
    typeName = TypeName.get(mte.getTypeMirror());
  }
  return typeName;
}
origin: yjfnypeu/Courier

private List<FieldData> parseField(TypeElement element) {
  List<FieldData> fieldList = new ArrayList<>();
  Params annotation = element.getAnnotation(Params.class);
  if (annotation == null) {
    return fieldList;
  }
  Field[] fields = annotation.fields();
  for (int i = 0; i < (fields == null ? 0 : fields.length); i++) {
    Field field = fields[i];
    FieldData data = new FieldData();
    data.setDoc(field.doc());
    data.setName(field.name());
    data.setType(getClzType(field));
    data.setFieldType(field.fieldType());
    data.setDefValue(field.defValue());
    fieldList.add(data);
  }
  return fieldList;
}
origin: yjfnypeu/Courier

@Params(fields = {
    @Field(name = "password",type = String.class)
})
public class SubActivity extends ParentActivity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    SubActivityArgsData data = SubActivityArgsData.getArguments(getIntent());
    password.setText(data.getPassword());
  }
}

origin: yjfnypeu/Courier

@Params(fields = {
    @Field(name = "username",type = String.class,doc = "用户名",defValue = "admin"),
    @Field(name = "password",type = String.class,doc = "密码"),
})
public class ParamsActivity extends Activity {

  @Bind(R.id.username)
  TextView username;
  @Bind(R.id.password)
  TextView password;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_params);
    ButterKnife.bind(this);
    // 获取传参
    ParamsActivityArgsData data = ParamsActivityArgsData.getArguments(getIntent());
    username.setText(data.getUsername());
    password.setText(data.getPassword());

  }
}

origin: yjfnypeu/Courier

@Params(fields = {
    @Field(name = "username", type = String.class)
})
public class ParentActivity extends Activity {

  @Bind(R.id.username)
  Button username;
  @Bind(R.id.password)
  Button password;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_parent);
    ButterKnife.bind(this);

    ParentActivityArgsData data = ParentActivityArgsData.getArguments(getIntent());
    username.setText(data.getUsername());

  }
}

origin: yjfnypeu/Courier

/**
 * @author Administrator
 */
@Params(fields = {
    @Field(name = "password", type = String.class, doc = "用户密码")
})
public class SubFragment extends TestFragment {
  public static final String TAG = SubFragment.class.getCanonicalName();
  SubFragmentArgsData requestData;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestData = SubFragmentArgsData.getArguments(this);
  }

  @Override
  public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    password.setText(requestData.getPassword());
  }
}

origin: yjfnypeu/Courier

inherited = false,
fields = {
@Field(name = "username", type = CharSequence.class, defValue = "\"username\"",doc = "用户名")
com.lzh.courier.annoapiField

Most used methods

  • <init>
  • defValue
  • doc
  • fieldType
  • name
  • type

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • getSharedPreferences (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now