Tabnine Logo
AbstractMojoTestCase.getVariablesAndValuesFromObject
Code IndexAdd Tabnine to your IDE (free)

How to use
getVariablesAndValuesFromObject
method
in
org.apache.maven.plugin.testing.AbstractMojoTestCase

Best Java code snippets using org.apache.maven.plugin.testing.AbstractMojoTestCase.getVariablesAndValuesFromObject (Showing top 8 results out of 315)

origin: org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Convenience method to obtain all variables and values from the mojo (including its superclasses)
 *
 * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
 *
 * @param object
 * @return map of variable names and values
 */
public Map<String, Object> getVariablesAndValuesFromObject( Object object )
  throws IllegalAccessException
{
  return testCase.getVariablesAndValuesFromObject( object );
}
origin: org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Convenience method to obtain all variables and values from the mojo (including its superclasses)
 *
 * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
 *
 * @param clazz
 * @param object
 * @return map of variable names and values
 */
public Map<String, Object> getVariablesAndValuesFromObject( Class<?> clazz, Object object )
  throws IllegalAccessException
{
  return testCase.getVariablesAndValuesFromObject( clazz, object );
}
origin: org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Convenience method to obtain all variables and values from the mojo (including its superclasses)
 *
 * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
 *
 * @param object
 * @return map of variable names and values
 */
protected Map<String, Object> getVariablesAndValuesFromObject( Object object )
  throws IllegalAccessException
{
  return getVariablesAndValuesFromObject( object.getClass(), object );
}
origin: org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Convenience method to obtain all variables and values from the mojo (including its superclasses)
 *
 * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
 *
 * @param clazz
 * @param object
 * @return map of variable names and values
 */
protected Map<String, Object> getVariablesAndValuesFromObject( Class<?> clazz, Object object )
  throws IllegalAccessException
{
  Map<String, Object> map = new HashMap<String, Object>();
  Field[] fields = clazz.getDeclaredFields();
  AccessibleObject.setAccessible( fields, true );
  for ( Field field : fields )
  {
    map.put( field.getName(), field.get( object ) );
  }
  Class<?> superclass = clazz.getSuperclass();
  if ( !Object.class.equals( superclass ) )
  {
    map.putAll( getVariablesAndValuesFromObject( superclass, object ) );
  }
  return map;
}
origin: com.simpligility.org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Convenience method to obtain all variables and values from the mojo (including its superclasses)
 *
 * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
 *
 * @param object
 * @return map of variable names and values
 */
public Map<String, Object> getVariablesAndValuesFromObject( Object object )
  throws IllegalAccessException
{
  return testCase.getVariablesAndValuesFromObject( object );
}
origin: com.simpligility.org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Convenience method to obtain all variables and values from the mojo (including its superclasses)
 *
 * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
 *
 * @param clazz
 * @param object
 * @return map of variable names and values
 */
public Map<String, Object> getVariablesAndValuesFromObject( Class<?> clazz, Object object )
  throws IllegalAccessException
{
  return testCase.getVariablesAndValuesFromObject( clazz, object );
}
origin: com.simpligility.org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Convenience method to obtain all variables and values from the mojo (including its superclasses)
 *
 * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
 *
 * @param object
 * @return map of variable names and values
 */
protected Map<String, Object> getVariablesAndValuesFromObject( Object object )
  throws IllegalAccessException
{
  return getVariablesAndValuesFromObject( object.getClass(), object );
}
origin: com.simpligility.org.apache.maven.plugin-testing/maven-plugin-testing-harness

/**
 * Convenience method to obtain all variables and values from the mojo (including its superclasses)
 *
 * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
 *
 * @param clazz
 * @param object
 * @return map of variable names and values
 */
protected Map<String, Object> getVariablesAndValuesFromObject( Class<?> clazz, Object object )
  throws IllegalAccessException
{
  Map<String, Object> map = new HashMap<String, Object>();
  Field[] fields = clazz.getDeclaredFields();
  AccessibleObject.setAccessible( fields, true );
  for ( Field field : fields )
  {
    map.put( field.getName(), field.get( object ) );
  }
  Class<?> superclass = clazz.getSuperclass();
  if ( !Object.class.equals( superclass ) )
  {
    map.putAll( getVariablesAndValuesFromObject( superclass, object ) );
  }
  return map;
}
org.apache.maven.plugin.testingAbstractMojoTestCasegetVariablesAndValuesFromObject

Javadoc

Convenience method to obtain all variables and values from the mojo (including its superclasses) Note: the values in the map are of type Object so the caller is responsible for casting to desired types.

Popular methods of AbstractMojoTestCase

  • setUp
  • tearDown
  • getContainer
  • lookupMojo
    lookup the mojo while we have all of the relavent information
  • assertNotNull
  • configureMojo
    Configure the mojo with the given plexus configuration
  • extractPluginConfiguration
  • fail
  • finalizeMojoConfiguration
  • getBasedir
  • getPluginDescriptorLocation
  • getPluginDescriptorPath
  • getPluginDescriptorLocation,
  • getPluginDescriptorPath,
  • getPublicDescriptorStream,
  • getVariableValueFromObject,
  • lookup,
  • lookupConfiguredMojo,
  • lookupEmptyMojo,
  • newMavenSession,
  • newMojoExecution

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JLabel (javax.swing)
  • From CI to AI: The AI layer in your organization
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