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

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • 14 Best Plugins for Eclipse
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