congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PropertyMatches.buildErrorMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
buildErrorMessage
method
in
org.springframework.beans.PropertyMatches

Best Java code snippets using org.springframework.beans.PropertyMatches.buildErrorMessage (Showing top 11 results out of 315)

origin: spring-projects/spring-framework

@Test
public void simpleBeanPropertyErrorMessage() {
  PropertyMatches matches = PropertyMatches.forProperty("naem", SampleBeanProperties.class);
  String msg = matches.buildErrorMessage();
  assertThat(msg, containsString("naem"));
  assertThat(msg, containsString("name"));
  assertThat(msg, containsString("setter"));
  assertThat(msg, not(containsString("field")));
}
origin: spring-projects/spring-framework

@Test
public void simpleFieldPropertyErrorMessage() {
  PropertyMatches matches = PropertyMatches.forField("naem", SampleFieldProperties.class);
  String msg = matches.buildErrorMessage();
  assertThat(msg, containsString("naem"));
  assertThat(msg, containsString("name"));
  assertThat(msg, containsString("field"));
  assertThat(msg, not(containsString("setter")));
}
origin: spring-projects/spring-framework

@Override
protected NotWritablePropertyException createNotWritablePropertyException(String propertyName) {
  PropertyMatches matches = PropertyMatches.forField(propertyName, getRootClass());
  throw new NotWritablePropertyException(
      getRootClass(), getNestedPath() + propertyName,
      matches.buildErrorMessage(), matches.getPossibleMatches());
}
origin: spring-projects/spring-framework

@Override
protected NotWritablePropertyException createNotWritablePropertyException(String propertyName) {
  PropertyMatches matches = PropertyMatches.forProperty(propertyName, getRootClass());
  throw new NotWritablePropertyException(getRootClass(), getNestedPath() + propertyName,
      matches.buildErrorMessage(), matches.getPossibleMatches());
}
origin: spring-projects/spring-framework

@Test
public void complexFieldPropertyErrorMessage() {
  PropertyMatches matches = PropertyMatches.forField("counter", SampleFieldProperties.class);
  String msg = matches.buildErrorMessage();
  assertThat(msg, containsString("counter"));
  assertThat(msg, containsString("counter1"));
  assertThat(msg, containsString("counter2"));
  assertThat(msg, containsString("counter3"));
}
origin: spring-projects/spring-framework

@Test
public void complexBeanPropertyErrorMessage() {
  PropertyMatches matches = PropertyMatches.forProperty("counter", SampleBeanProperties.class);
  String msg = matches.buildErrorMessage();
  assertThat(msg, containsString("counter"));
  assertThat(msg, containsString("counter1"));
  assertThat(msg, containsString("counter2"));
  assertThat(msg, containsString("counter3"));
}
origin: org.springframework/spring-beans

@Override
protected NotWritablePropertyException createNotWritablePropertyException(String propertyName) {
  PropertyMatches matches = PropertyMatches.forField(propertyName, getRootClass());
  throw new NotWritablePropertyException(
      getRootClass(), getNestedPath() + propertyName,
      matches.buildErrorMessage(), matches.getPossibleMatches());
}
origin: org.springframework/spring-beans

@Override
protected NotWritablePropertyException createNotWritablePropertyException(String propertyName) {
  PropertyMatches matches = PropertyMatches.forProperty(propertyName, getRootClass());
  throw new NotWritablePropertyException(getRootClass(), getNestedPath() + propertyName,
      matches.buildErrorMessage(), matches.getPossibleMatches());
}
origin: camunda/camunda-bpm-platform

throw new NotWritablePropertyException(
    getRootClass(), this.nestedPath + propertyName,
    matches.buildErrorMessage(), matches.getPossibleMatches());
origin: apache/servicemix-bundles

@Override
protected NotWritablePropertyException createNotWritablePropertyException(String propertyName) {
  PropertyMatches matches = PropertyMatches.forProperty(propertyName, getRootClass());
  throw new NotWritablePropertyException(getRootClass(), getNestedPath() + propertyName,
      matches.buildErrorMessage(), matches.getPossibleMatches());
}
origin: apache/servicemix-bundles

@Override
protected NotWritablePropertyException createNotWritablePropertyException(String propertyName) {
  PropertyMatches matches = PropertyMatches.forField(propertyName, getRootClass());
  throw new NotWritablePropertyException(
      getRootClass(), getNestedPath() + propertyName,
      matches.buildErrorMessage(), matches.getPossibleMatches());
}
org.springframework.beansPropertyMatchesbuildErrorMessage

Javadoc

Build an error message for the given invalid property name, indicating the possible property matches.

Popular methods of PropertyMatches

  • forProperty
    Create PropertyMatches for the given bean property.
  • getPossibleMatches
    Return the calculated possible matches.
  • forField
    Create PropertyMatches for the given field property.
  • <init>
    Create a new PropertyMatches instance for the given property and possible matches.
  • calculateMatches
    Generate possible property alternatives for the given property and class. Internally uses the getStr
  • calculateStringDistance
    Calculate the distance between the given two Strings according to the Levenshtein algorithm.

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • startActivity (Activity)
  • getContentResolver (Context)
  • Menu (java.awt)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top PhpStorm plugins
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