public final class FactBuilder extends Object
A fact declaration for RuleBuilder. Fact type can be specified
both as a Java Class or as a type name.
| Modifier and Type | Method and Description |
|---|---|
static FactBuilder |
fact(String name,
Class<?> type)
'import static' this method for brevity of fact declarations.
|
static FactBuilder |
fact(String name,
String type)
'import static' this method for brevity of fact declarations.
|
String |
getName()
The fact's variable name
|
Class<?> |
getResolvedType()
Returns fact's type as Java Class
|
String |
getUnresolvedType()
Returns fact's type as String
|
public static FactBuilder fact(String name, String type)
'import static' this method for brevity of fact declarations.
name - fact type's reference variabletype - fact's type nameNullPointerException - if any of the parameters is nullpublic static FactBuilder fact(String name, Class<?> type)
'import static' this method for brevity of fact declarations.
name - fact type's reference variabletype - fact's Java classNullPointerException - if any of the parameters is nullpublic String getName()
The fact's variable name
public String getUnresolvedType()
Returns fact's type as String
null if the fact is declared as Java class.public Class<?> getResolvedType()
Returns fact's type as Java Class
null if the fact's type is declared as named type.Copyright © 2021. All rights reserved.