objexj

Objex J

Лицензия

Лицензия

MIT
Группа

Группа

com.edugility
Идентификатор

Идентификатор

objexj
Последняя версия

Последняя версия

1.3.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

objexj
Objex J
Организация-разработчик

Организация-разработчик

Laird Nelson
Система контроля версий

Система контроля версий

https://github.com/ljnelson/objexj/

Скачать objexj

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.edugility/objexj/ -->
<dependency>
    <groupId>com.edugility</groupId>
    <artifactId>objexj</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.edugility/objexj/
implementation 'com.edugility:objexj:1.3.0'
// https://jarcasting.com/artifacts/com.edugility/objexj/
implementation ("com.edugility:objexj:1.3.0")
'com.edugility:objexj:jar:1.3.0'
<dependency org="com.edugility" name="objexj" rev="1.3.0">
  <artifact name="objexj" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.edugility', module='objexj', version='1.3.0')
)
libraryDependencies += "com.edugility" % "objexj" % "1.3.0"
[com.edugility/objexj "1.3.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.mvel : mvel2 jar 2.1.3.Final

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11

Модули Проекта

Данный проект не имеет модулей.

objexj

Regular Expressions for Java Objects

January 16, 2012

Laird Nelson

objexj is a small project that provides the ability to match input (a List of items) against an expression.

That of course is what regular expressions are all about.

The difference here is that you can use any Java Object you want, not just characters in a string.

The syntax hews close to Perl-compatible regular expressions, with a few modifications.

The underlying machinery is heavily inspired by Russ Cox's excellent paper entitled Regular Expression Matching: the Virtual Machine Approach.

Sample Code

@Test
public void testLastException() throws IOException {
  final String sourceCode = "^java.lang.Exception*/(java.lang.Exception(message == \"third\"))$";
  final Pattern<Exception> pattern = Pattern.compile(sourceCode);
  assertNotNull(pattern);

  final List<Exception> input = new ArrayList<Exception>();
  input.add(new IllegalStateException("first"));
  input.add(new IllegalArgumentException("second"));
  final Exception third = new RuntimeException("third");
  input.add(third);

  final Matcher<Exception> matcher = pattern.matcher(input);
  assertNotNull(matcher);

  assertEquals(2, matcher.groupCount());

  final List<Exception> group1 = matcher.group(1);
  assertNotNull(group1);
  assertEquals(1, group1.size());

  final Exception group1Exception = group1.get(0);
  assertSame(third, group1Exception);
}

Версии библиотеки

Версия
1.3.0
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0