Tabnine Logo
ViewId.value
Code IndexAdd Tabnine to your IDE (free)

How to use
value
method
in
uk.co.ribot.easyadapter.annotations.ViewId

Best Java code snippets using uk.co.ribot.easyadapter.annotations.ViewId.value (Showing top 1 results out of 315)

origin: ribot/easy-adapter

/**
 * Parse {@link ViewId} annotation and try to assign the view with that id to the annotated field.
 * It will throw a {@link ClassCastException} if the field and the view with the given ID have different types.
 *
 * @param object     object where the annotation is.
 * @param viewFinder callback that provides a way of finding the view by the viewID given in the annotation.
 */
private static void setViewFields(final Object object, final ViewFinder viewFinder) {
  Field[] fields = object.getClass().getDeclaredFields();
  for (Field field : fields) {
    if (field.isAnnotationPresent(ViewId.class)) {
      field.setAccessible(true);
      ViewId viewIdAnnotation = field.getAnnotation(ViewId.class);
      try {
        field.set(object, field.getType().cast(viewFinder.findViewById(viewIdAnnotation.value())));
      } catch (IllegalAccessException e) {
        e.printStackTrace();
      }
    }
  }
}
uk.co.ribot.easyadapter.annotationsViewIdvalue

Popular methods of ViewId

  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JComboBox (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now