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

How to use
ReflectUtils
in
org.crazyyak.dev.common

Best Java code snippets using org.crazyyak.dev.common.ReflectUtils (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: org.crazyyak.dev/yak-dev-jersey-spring

 protected String[] getSpringProfiles(ServletContext servletContext, WebApplicationContext appContext) {

  String environmentName = System.getProperty(getEnvironmentPropertyName(servletContext, appContext), "null");
  String envProfileName = "env-"+environmentName;
  String defaultProfiles = StringUtils.toDelineatedString(",", "main", "live", envProfileName);

  String profilesString = System.getProperty(getProfilesPropertyName(servletContext, appContext), defaultProfiles);
  List<String> profiles = new ArrayList<>();

  for (String profile : profilesString.split(",")) {
   profiles.add(profile.trim());
  }

  return ReflectUtils.toArray(String.class, profiles);
 }
}
origin: org.crazyyak.dev/yak-dev-couchace

protected void injectVersion(T entity, WriteResponse response) {
 String version = response.getDocumentRevision();
 EntityMeta<T> meta = new AnnotationMetaBuilder().buildEntityMeta(entityType);
 String property = meta.getRevisionName();
 Field field = ReflectUtils.getField(entity.getClass(), property);
 ReflectUtils.setPropertyValue(entity, field, version);
}
origin: com.cosmicpush/push-server-engine

@JsonCreator
private NotificationPushV1(@JsonProperty("message") String message,
              @JsonProperty("callbackUrl") String callbackUrl,
              @JsonProperty("remoteHost") String remoteHost,
              @JsonProperty("remoteAddress") String remoteAddress,
              @JsonProperty("traits") Map<String, String> traits) {
 this.message = (message == null) ? "No message" : message.trim();
 this.remoteHost = remoteHost;
 this.remoteAddress = remoteAddress;
 this.callbackUrl = callbackUrl;
 // Get a list of all the keys so that we can loop on the map
 // and remove anything without an actual value (purge nulls).
 if (traits != null) {
  this.traits.putAll(traits);
 }
 String[] keys = ReflectUtils.toArray(String.class, this.traits.keySet());
 for (String key : keys) {
  if (StringUtils.isBlank(this.traits.get(key))) {
   this.traits.remove(key);
  }
 }
}
origin: com.cosmicpush/push-server-pub

String[] keys = ReflectUtils.toArray(String.class, this.traits.keySet());
origin: com.cosmicpush/push-server-pub

private SmtpEmailPush(@JsonProperty("toAddress") String toAddress,
            @JsonProperty("fromAddress") String fromAddress,
            @JsonProperty("emailSubject") String emailSubject,
            @JsonProperty("htmlContent") String htmlContent,
            @JsonProperty("callbackUrl") String callbackUrl,
            @JsonProperty("remoteHost") String remoteHost,
            @JsonProperty("remoteAddress") String remoteAddress,
            @JsonProperty("traits") Map<String, String> traits) {
 this.toAddress =   toAddress;
 this.fromAddress = fromAddress;
 this.emailSubject = emailSubject;
 String content = StringUtils.getTagContents(htmlContent, "body", 0);
 this.htmlContent = StringUtils.isNotBlank(content) ? content : htmlContent;
 this.callbackUrl = callbackUrl;
 this.remoteHost = remoteHost;
 this.remoteAddress = remoteAddress;
 // Get a list of all the keys so that we can loop on the map
 // and remove anything without an actual value (purge nulls).
 if (traits != null) {
  this.traits.putAll(traits);
 }
 String[] keys = ReflectUtils.toArray(String.class, this.traits.keySet());
 for (String key : keys) {
  if (StringUtils.isBlank(this.traits.get(key))) {
   this.traits.remove(key);
  }
 }
}
origin: com.cosmicpush/push-server-pub

protected EmailPush(@JsonProperty("toAddress") String toAddress,
          @JsonProperty("fromAddress") String fromAddress,
          @JsonProperty("emailSubject") String emailSubject,
          @JsonProperty("htmlContent") String htmlContent,
          @JsonProperty("callbackUrl") String callbackUrl,
          @JsonProperty("remoteHost") String remoteHost,
          @JsonProperty("remoteAddress") String remoteAddress,
          @JsonProperty("traits") Map<String, String> traits) {
 this.toAddress =   toAddress;
 this.fromAddress = fromAddress;
 this.emailSubject = emailSubject;
 String content = StringUtils.getTagContents(htmlContent, "body", 0);
 this.htmlContent = StringUtils.isNotBlank(content) ? content : htmlContent;
 this.callbackUrl = callbackUrl;
 this.remoteHost = remoteHost;
 this.remoteAddress = remoteAddress;
 // Get a list of all the keys so that we can loop on the map
 // and remove anything without an actual value (purge nulls).
 if (traits != null) {
  this.traits.putAll(traits);
 }
 String[] keys = ReflectUtils.toArray(String.class, this.traits.keySet());
 for (String key : keys) {
  if (StringUtils.isBlank(this.traits.get(key))) {
   this.traits.remove(key);
  }
 }
}
origin: com.cosmicpush/push-server-pub

private SesEmailPush(@JsonProperty("toAddress") String toAddress,
           @JsonProperty("fromAddress") String fromAddress,
           @JsonProperty("emailSubject") String emailSubject,
           @JsonProperty("htmlContent") String htmlContent,
           @JsonProperty("callbackUrl") String callbackUrl,
           @JsonProperty("remoteHost") String remoteHost,
           @JsonProperty("remoteAddress") String remoteAddress,
           @JsonProperty("traits") Map<String, String> traits) {
 this.toAddress =   toAddress;
 this.fromAddress = fromAddress;
 this.emailSubject = emailSubject;
 String content = StringUtils.getTagContents(htmlContent, "body", 0);
 this.htmlContent = StringUtils.isNotBlank(content) ? content : htmlContent;
 this.callbackUrl = callbackUrl;
 this.remoteHost = remoteHost;
 this.remoteAddress = remoteAddress;
 // Get a list of all the keys so that we can loop on the map
 // and remove anything without an actual value (purge nulls).
 if (traits != null) {
  this.traits.putAll(traits);
 }
 String[] keys = ReflectUtils.toArray(String.class, this.traits.keySet());
 for (String key : keys) {
  if (StringUtils.isBlank(this.traits.get(key))) {
   this.traits.remove(key);
  }
 }
}
org.crazyyak.dev.commonReflectUtils

Most used methods

  • toArray
  • getField
  • setPropertyValue

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Kernel (java.awt.image)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Option (scala)
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