package com.tutego.insel.meta;

public class ReadPrivate
{
  @SuppressWarnings( "all" )
  private String privateKey = "Schnuppelhase";

  public static void main( String[] args ) throws Exception
  {
    ReadPrivate key = new ReadPrivate();
    Class<?> c = key.getClass();

    java.lang.reflect.Field field = c.getDeclaredField( "privateKey" );

    // java.lang.reflect.AccessibleObject vererbt uns was an
    // Constructor, Field und Method
    field.setAccessible( true );

    System.out.println( field.get(key) );  // Schnuppelhase
    field.set( key, "Schnuckibutzihasidrachelchen");

    System.out.println( field.get(key) ); // Schnuckibutzihasidrachelchen
  }
}
