Tabnine Logo
PackageNameMappingWithPackagePattern
Code IndexAdd Tabnine to your IDE (free)

How to use
PackageNameMappingWithPackagePattern
in
org.jboss.windup.rules.apps.java.scan.operation.packagemapping

Best Java code snippets using org.jboss.windup.rules.apps.java.scan.operation.packagemapping.PackageNameMappingWithPackagePattern (Showing top 3 results out of 315)

origin: org.jboss.windup.rules.apps/rules-java

@Override
public Void processElement(ParserContext context, Element element)
{
  String from = $(element).attr(FROM);
  String to = $(element).attr(TO);
  if (StringUtils.isBlank(from))
  {
    throw new WindupException("The '" + ELEM_NAME + "' element must have a non-empty '" + FROM + "' attribute");
  }
  if (StringUtils.isBlank(to))
  {
    throw new WindupException("The '" + ELEM_NAME + "' element must have a non-empty '" + TO + "' attribute");
  }
  context.getBuilder().addRule(PackageNameMapping.fromPackage(from).toOrganization(to));
  return null;
}
origin: windup/windup

@Override
public Void processElement(ParserContext context, Element element)
{
  String id = $(element).attr("id");
  String from = $(element).attr(FROM);
  String to = $(element).attr(TO);
  if (StringUtils.isBlank(from))
  {
    throw new WindupException("The '" + ELEM_NAME + "' element must have a non-empty '" + FROM + "' attribute");
  }
  if (StringUtils.isBlank(to))
  {
    throw new WindupException("The '" + ELEM_NAME + "' element must have a non-empty '" + TO + "' attribute");
  }
  PackageNameMappingWithOrganization withOrganization = PackageNameMapping.fromPackage(from).toOrganization(to);
  Rule rule = StringUtils.isNotBlank(id) ? withOrganization.withId(id) : withOrganization;
  if (rule instanceof Context)
    ((Context) rule).put(RuleMetadataType.RULE_XML, XmlUtil.nodeToString(element));
  context.getBuilder().addRule(rule);
  return null;
}
origin: org.jboss.windup.rules.apps/windup-rules-java-api

@Override
public Void processElement(ParserContext context, Element element)
{
  String id = $(element).attr("id");
  String from = $(element).attr(FROM);
  String to = $(element).attr(TO);
  if (StringUtils.isBlank(from))
  {
    throw new WindupException("The '" + ELEM_NAME + "' element must have a non-empty '" + FROM + "' attribute");
  }
  if (StringUtils.isBlank(to))
  {
    throw new WindupException("The '" + ELEM_NAME + "' element must have a non-empty '" + TO + "' attribute");
  }
  PackageNameMappingWithOrganization withOrganization = PackageNameMapping.fromPackage(from).toOrganization(to);
  Rule rule = StringUtils.isNotBlank(id) ? withOrganization.withId(id) : withOrganization;
  if (rule instanceof Context)
    ((Context) rule).put(RuleMetadataType.RULE_XML, XmlUtil.nodeToString(element));
  context.getBuilder().addRule(rule);
  return null;
}
org.jboss.windup.rules.apps.java.scan.operation.packagemappingPackageNameMappingWithPackagePattern

Javadoc

Interface to assist in the construction of PackageNameMapping Rules.

Most used methods

  • toOrganization
    Sets the package pattern to match against.

Popular in Java

  • Making http post requests using okhttp
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • 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