congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
FieldUtils.setProtectedFieldValue
Code IndexAdd Tabnine to your IDE (free)

How to use
setProtectedFieldValue
method
in
org.springframework.security.util.FieldUtils

Best Java code snippets using org.springframework.security.util.FieldUtils.setProtectedFieldValue (Showing top 5 results out of 315)

origin: spring-projects/spring-security

private MutableAcl initializeTransientFields(MutableAcl value) {
  if (value instanceof AclImpl) {
    FieldUtils.setProtectedFieldValue("aclAuthorizationStrategy", value,
        this.aclAuthorizationStrategy);
    FieldUtils.setProtectedFieldValue("permissionGrantingStrategy", value,
        this.permissionGrantingStrategy);
  }
  if (value.getParentAcl() != null) {
    initializeTransientFields((MutableAcl) value.getParentAcl());
  }
  return value;
}
origin: spring-projects/spring-security

private MutableAcl initializeTransientFields(MutableAcl value) {
  if (value instanceof AclImpl) {
    FieldUtils.setProtectedFieldValue("aclAuthorizationStrategy", value,
        this.aclAuthorizationStrategy);
    FieldUtils.setProtectedFieldValue("permissionGrantingStrategy", value,
        this.permissionGrantingStrategy);
  }
  if (value.getParentAcl() != null) {
    initializeTransientFields((MutableAcl) value.getParentAcl());
  }
  return value;
}
origin: spring-projects/spring-security

  @Test
  public void gettingAndSettingProtectedFieldIsSuccessful() throws Exception {
    new FieldUtils();

    Object tc = new TestClass();

    assertThat(FieldUtils.getProtectedFieldValue("protectedField", tc)).isEqualTo("x");
    assertThat(FieldUtils.getFieldValue(tc, "nested.protectedField")).isEqualTo("z");
    FieldUtils.setProtectedFieldValue("protectedField", tc, "y");
    assertThat(FieldUtils.getProtectedFieldValue("protectedField", tc)).isEqualTo("y");

    try {
      FieldUtils.getProtectedFieldValue("nonExistentField", tc);
    }
    catch (IllegalStateException expected) {
    }
  }
}
origin: apache/servicemix-bundles

private MutableAcl initializeTransientFields(MutableAcl value) {
  if (value instanceof AclImpl) {
    FieldUtils.setProtectedFieldValue("aclAuthorizationStrategy", value,
        this.aclAuthorizationStrategy);
    FieldUtils.setProtectedFieldValue("permissionGrantingStrategy", value,
        this.permissionGrantingStrategy);
  }
  if (value.getParentAcl() != null) {
    initializeTransientFields((MutableAcl) value.getParentAcl());
  }
  return value;
}
origin: apache/servicemix-bundles

private MutableAcl initializeTransientFields(MutableAcl value) {
  if (value instanceof AclImpl) {
    FieldUtils.setProtectedFieldValue("aclAuthorizationStrategy", value,
        this.aclAuthorizationStrategy);
    FieldUtils.setProtectedFieldValue("permissionGrantingStrategy", value,
        this.permissionGrantingStrategy);
  }
  if (value.getParentAcl() != null) {
    initializeTransientFields((MutableAcl) value.getParentAcl());
  }
  return value;
}
org.springframework.security.utilFieldUtilssetProtectedFieldValue

Popular methods of FieldUtils

  • getProtectedFieldValue
  • getField
    Attempts to locate the specified field on the class.
  • getFieldValue
    Returns the value of a (nested) field on a bean. Intended for testing.
  • <init>

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Runner (org.openjdk.jmh.runner)
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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