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

How to use
Location
in
org.springframework.beans.factory.parsing

Best Java code snippets using org.springframework.beans.factory.parsing.Location (Showing top 20 results out of 315)

origin: spring-projects/spring-framework

public Location getResourceLocation() {
  return new Location(this.configurationClass.getResource(), this.metadata);
}
origin: spring-projects/spring-framework

/**
 * Get the description of the bean configuration source that triggered the error,
 * as contained within this Problem's Location object.
 * @see #getLocation()
 */
public String getResourceDescription() {
  return getLocation().getResource().getDescription();
}
origin: mulesoft/mule

protected Problem extendProblemDetails(Problem problem) {
 try {
  String element = ((Element) problem.getLocation().getSource()).getLocalName();
  String namespace = ((Element) problem.getLocation().getSource()).getNamespaceURI();
  String message = "The element '" + element + "' does not have an associated Bean Definition Parser."
    + "  " + getMissingModuleOrExtensionMessage(namespace);
  return new Problem(message, problem.getLocation(), problem.getParseState(), problem.getRootCause());
 } catch (Exception e) {
  // fall back to previous message
  return problem;
 }
}
origin: org.mule.runtime/mule-module-spring-config

protected Problem extendProblemDetails(Problem problem) {
 try {
  String element = ((Element) problem.getLocation().getSource()).getLocalName();
  String namespace = ((Element) problem.getLocation().getSource()).getNamespaceURI();
  String message = "The element '" + element + "' does not have an associated Bean Definition Parser."
    + "  " + getMissingModuleOrExtensionMessage(namespace);
  return new Problem(message, problem.getLocation(), problem.getParseState(), problem.getRootCause());
 } catch (Exception e) {
  // fall back to previous message
  return problem;
 }
}
origin: spring-projects/spring-framework

/**
 * Raise a fatal error.
 */
public void fatal(String message, @Nullable Object source, @Nullable ParseState parseState, @Nullable Throwable cause) {
  Location location = new Location(getResource(), source);
  this.problemReporter.fatal(new Problem(message, location, parseState, cause));
}
origin: org.springframework/spring-beans

/**
 * Get the description of the bean configuration source that triggered the error,
 * as contained within this Problem's Location object.
 * @see #getLocation()
 */
public String getResourceDescription() {
  return getLocation().getResource().getDescription();
}
origin: spring-projects/spring-framework

/**
 * Raise a regular error.
 */
public void error(String message, @Nullable Object source, @Nullable ParseState parseState, @Nullable Throwable cause) {
  Location location = new Location(getResource(), source);
  this.problemReporter.error(new Problem(message, location, parseState, cause));
}
origin: camunda/camunda-bpm-platform

/**
 * Get the description of the bean configuration source that triggered the error,
 * as contained within this Problem's Location object.
 * @see #getLocation()
 */
public String getResourceDescription() {
  return getLocation().getResource().getDescription();
}
origin: spring-projects/spring-framework

/**
 * Raise a non-critical warning.
 */
public void warning(String message, @Nullable Object source, @Nullable ParseState parseState, @Nullable Throwable cause) {
  Location location = new Location(getResource(), source);
  this.problemReporter.warning(new Problem(message, location, parseState, cause));
}
origin: apache/servicemix-bundles

/**
 * Get the description of the bean configuration source that triggered the error,
 * as contained within this Problem's Location object.
 * @see #getLocation()
 */
public String getResourceDescription() {
  return getLocation().getResource().getDescription();
}
origin: org.springframework/spring-context

public Location getResourceLocation() {
  return new Location(this.configurationClass.getResource(), this.metadata);
}
origin: spring-projects/spring-framework

  public FinalConfigurationProblem() {
    super(String.format("@Configuration class '%s' may not be final. Remove the final modifier to continue.",
        getSimpleName()), new Location(getResource(), getMetadata()));
  }
}
origin: spring-projects/spring-framework

/**
 * Define a Spring XML namespace definition to use.
 * @param definition the namespace definition
 */
public void xmlns(Map<String, String> definition) {
  if (!definition.isEmpty()) {
    for (Map.Entry<String,String> entry : definition.entrySet()) {
      String namespace = entry.getKey();
      String uri = entry.getValue();
      if (uri == null) {
        throw new IllegalArgumentException("Namespace definition must supply a non-null URI");
      }
      NamespaceHandler namespaceHandler =
          this.groovyDslXmlBeanDefinitionReader.getNamespaceHandlerResolver().resolve(uri);
      if (namespaceHandler == null) {
        throw new BeanDefinitionParsingException(new Problem("No namespace handler found for URI: " + uri,
            new Location(new DescriptiveResource(("Groovy")))));
      }
      this.namespaces.put(namespace, uri);
    }
  }
}
origin: org.springframework/spring-beans

/**
 * Raise a regular error.
 */
public void error(String message, @Nullable Object source, @Nullable ParseState parseState, @Nullable Throwable cause) {
  Location location = new Location(getResource(), source);
  this.problemReporter.error(new Problem(message, location, parseState, cause));
}
origin: org.springframework/spring-beans

/**
 * Raise a non-critical warning.
 */
public void warning(String message, @Nullable Object source, @Nullable ParseState parseState, @Nullable Throwable cause) {
  Location location = new Location(getResource(), source);
  this.problemReporter.warning(new Problem(message, location, parseState, cause));
}
origin: org.springframework/spring-beans

/**
 * Raise a fatal error.
 */
public void fatal(String message, @Nullable Object source, @Nullable ParseState parseState, @Nullable Throwable cause) {
  Location location = new Location(getResource(), source);
  this.problemReporter.fatal(new Problem(message, location, parseState, cause));
}
origin: org.springframework/spring-context

  public FinalConfigurationProblem() {
    super(String.format("@Configuration class '%s' may not be final. Remove the final modifier to continue.",
        getSimpleName()), new Location(getResource(), getMetadata()));
  }
}
origin: org.springframework/spring-beans

/**
 * Define a Spring XML namespace definition to use.
 * @param definition the namespace definition
 */
public void xmlns(Map<String, String> definition) {
  if (!definition.isEmpty()) {
    for (Map.Entry<String,String> entry : definition.entrySet()) {
      String namespace = entry.getKey();
      String uri = entry.getValue();
      if (uri == null) {
        throw new IllegalArgumentException("Namespace definition must supply a non-null URI");
      }
      NamespaceHandler namespaceHandler =
          this.groovyDslXmlBeanDefinitionReader.getNamespaceHandlerResolver().resolve(uri);
      if (namespaceHandler == null) {
        throw new BeanDefinitionParsingException(new Problem("No namespace handler found for URI: " + uri,
            new Location(new DescriptiveResource(("Groovy")))));
      }
      this.namespaces.put(namespace, uri);
    }
  }
}
origin: spring-projects/spring-framework

  public CircularImportProblem(ConfigurationClass attemptedImport, Deque<ConfigurationClass> importStack) {
    super(String.format("A circular @Import has been detected: " +
        "Illegal attempt by @Configuration class '%s' to import class '%s' as '%s' is " +
        "already present in the current import stack %s", importStack.element().getSimpleName(),
        attemptedImport.getSimpleName(), attemptedImport.getSimpleName(), importStack),
        new Location(importStack.element().getResource(), attemptedImport.getMetadata()));
  }
}
origin: spring-projects/spring-framework

new Location(encodedResource.getResource()), null, ex));
org.springframework.beans.factory.parsingLocation

Javadoc

Class that models an arbitrary location in a Resource.

Typically used to track the location of problematic or erroneous metadata in XML configuration files. For example, a #getSource() location might be 'The bean defined on line 76 of beans.properties has an invalid Class'; another source might be the actual DOM Element from a parsed XML org.w3c.dom.Document; or the source object might simply be null.

Most used methods

  • <init>
    Create a new instance of the Location class.
  • getResource
    Get the resource with which this location is associated.
  • getSource
    Get the actual location within the associated #getResource()(may be null).See the Location for examp

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • compareTo (BigDecimal)
  • putExtra (Intent)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Top 12 Jupyter Notebook extensions
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