Tabnine Logo
Attribute
Code IndexAdd Tabnine to your IDE (free)

How to use
Attribute
in
com.orhanobut.tracklytics

Best Java code snippets using com.orhanobut.tracklytics.Attribute (Showing top 5 results out of 315)

origin: orhanobut/tracklytics

@TrackEvent("another_event")
@Attribute("user_id") // This attribute will use return value as attribute value.
private String userId() {
 return "2342";
}
origin: orhanobut/tracklytics

private void addAttribute(Attribute attribute, Object methodResult, Map<String, Object> attributes) {
 if (attribute == null) return;
 Object value = null;
 if (methodResult != null) {
  value = methodResult;
 } else if (attribute.defaultValue().length() != 0) {
  value = attribute.defaultValue();
 }
 attributes.put(attribute.value(), value);
 if (attribute.isSuper()) {
  addSuperAttribute(attribute.value(), value);
 }
}
origin: orhanobut/tracklytics

private void addSuperAttributesFromParameters(Annotation[][] keys, Object[] values) {
 if (keys == null || values == null) {
  return;
 }
 for (int i = 0, size = keys.length; i < size; i++) {
  if (keys[i].length == 0) {
   continue;
  }
  Object value = values[i];
  Annotation annotation = keys[i][0];
  if (annotation instanceof Attribute) {
   Attribute attribute = (Attribute) annotation;
   Object result = null;
   if (value != null) {
    result = value;
   } else if (attribute.defaultValue().length() != 0) {
    result = attribute.defaultValue();
   }
   addSuperAttribute(attribute.value(), result);
  }
 }
}
origin: orhanobut/tracklytics

if (value != null) {
 result = value;
} else if (attribute.defaultValue().length() != 0) {
 result = attribute.defaultValue();
attributes.put(attribute.value(), result);
if (attribute.isSuper()) {
 addSuperAttribute(attribute.value(), result);
origin: orhanobut/tracklytics

@TrackEvent("login")
private void onLoggedIn(@TrackableAttribute User user, @Attribute("id") String id) {
}
com.orhanobut.tracklyticsAttribute

Most used methods

  • <init>
  • defaultValue
  • isSuper
  • value

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Notification (javax.management)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Github Copilot alternatives
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