|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbyucc.edif.tools.merge.BasicEdifBusNamingPolicy
public class BasicEdifBusNamingPolicy
Basic implementation of the EdifBusNamingPolicy using regular expressions. This class performs the parsing on given EdifNet names by comparing the names with predefined regular expressions. The regular expression defines the naming policy.
| Field Summary | |
|---|---|
(package private) java.util.regex.Pattern |
_p
|
static java.lang.String |
BRACKET_INT_COLON_INT_BRACKET_RANGE_REGEX
|
static java.lang.String |
PARAN_INT_COLON_INT_PARAN_RANGE_REGEX
|
| Constructor Summary | |
|---|---|
BasicEdifBusNamingPolicy(java.lang.String regex)
Create a new naming policy based on the given regular expression. |
|
| Method Summary | |
|---|---|
java.lang.String |
getBusBaseName(java.lang.String name)
Return the basename of the bus name without all of the bus range information. |
int |
getLeftBusLimit(java.lang.String name)
Returns the integer value of the "left" bus limit within the bus string name (i.e. will return a "4" for the following naming example "(4:8)"). |
java.util.regex.Matcher |
getMatcher(java.lang.String name)
|
int |
getRightBusLimit(java.lang.String name)
Returns the integer value of the "right" bus limit within the bus string name (i.e. will return a "8" for the following naming example "(4:8)"). |
boolean |
isValidBusName(java.lang.String name)
Indicates whether the given String is a valid Bus name using the implemented bus naming policy. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PARAN_INT_COLON_INT_PARAN_RANGE_REGEX
public static final java.lang.String BRACKET_INT_COLON_INT_BRACKET_RANGE_REGEX
java.util.regex.Pattern _p
| Constructor Detail |
|---|
public BasicEdifBusNamingPolicy(java.lang.String regex)
| Method Detail |
|---|
public boolean isValidBusName(java.lang.String name)
EdifBusNamingPolicy
isValidBusName in interface EdifBusNamingPolicypublic java.util.regex.Matcher getMatcher(java.lang.String name)
public int getLeftBusLimit(java.lang.String name)
EdifBusNamingPolicy
getLeftBusLimit in interface EdifBusNamingPolicypublic int getRightBusLimit(java.lang.String name)
EdifBusNamingPolicy
getRightBusLimit in interface EdifBusNamingPolicypublic java.lang.String getBusBaseName(java.lang.String name)
EdifBusNamingPolicy
getBusBaseName in interface EdifBusNamingPolicypublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||