|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbyucc.edif.BasicEdifBusNetNamingPolicy
public class BasicEdifBusNetNamingPolicy
Basic implementation of the EdifBusNetNamingPolicy 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 | |
|---|---|
private java.util.regex.Pattern |
_p
Local copy of the Pattern. |
static java.lang.String |
LESS_BITPOS_GREATER_REGEX
This regular expression will match against a net name that end in "<<#>>" where <#> is a decimal number. |
static java.lang.String |
PARAN_BITPOS_PARAN_REGEX
This regular expression will match against a net name that ends in "(<#>)" where <#> is a decimal number. |
static java.lang.String |
UNDERSCORE_BITPOS_REGEX
This regular expression will match against a net name that ends in "_<#>" where <#> is a decimal number. |
static java.lang.String |
UNDERSCORE_BITPOS_UNDERSCORE_REGEX
This regular expression will match against a net name that ends in "_<#>_" where <#> is a decimal number. |
| Constructor Summary | |
|---|---|
BasicEdifBusNetNamingPolicy()
The default constructor will create a naming policy based on the UNDERSCORE_BITPOS_UNDERSCORE_REGEX. |
|
BasicEdifBusNetNamingPolicy(java.lang.String regex)
Create a new naming policy based on the given regular expression. |
|
| Method Summary | |
|---|---|
static EdifBusNetNamingPolicy |
EdifBusNetNamingPolicy(java.lang.String str)
Parse a string and identifies the bus net naming scheme that matches the given string. |
java.lang.String |
generateBitSuffix(int bitPos)
Given a bit number, create a bit suffix that matches the naming policy |
java.lang.String |
getBusBaseName(java.lang.String name)
Parse the given bus net name to determine its basename according to the policy. |
static java.lang.String |
getBusBaseNameStatic(java.lang.String str)
Get the base name of a bus net name by first determining which policy it conforms to and then calling the getBusBaseName(String) method on that policy. |
int |
getBusPosition(java.lang.String name)
Parse the given bus net name to determine its bit position according to the policy. |
private java.util.regex.Matcher |
getMatcher(java.lang.String name)
|
java.lang.String |
getRegexString()
Get the regular expression string used to parse bus net names for this policy |
boolean |
isValidBusNetName(java.lang.String name)
Determine if the given bus net name is valid according to the 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 UNDERSCORE_BITPOS_REGEX
public static final java.lang.String UNDERSCORE_BITPOS_UNDERSCORE_REGEX
public static final java.lang.String PARAN_BITPOS_PARAN_REGEX
public static final java.lang.String LESS_BITPOS_GREATER_REGEX
private java.util.regex.Pattern _p
| Constructor Detail |
|---|
public BasicEdifBusNetNamingPolicy()
UNDERSCORE_BITPOS_UNDERSCORE_REGEX.
public BasicEdifBusNetNamingPolicy(java.lang.String regex)
| Method Detail |
|---|
public static EdifBusNetNamingPolicy EdifBusNetNamingPolicy(java.lang.String str)
public java.lang.String getBusBaseName(java.lang.String name)
getBusBaseName in interface EdifBusNetNamingPolicyname - the bus net name to parse
public static java.lang.String getBusBaseNameStatic(java.lang.String str)
name - the bus net name to parse
public java.lang.String generateBitSuffix(int bitPos)
generateBitSuffix in interface EdifBusNetNamingPolicybitPos - bit positionpublic int getBusPosition(java.lang.String name)
getBusPosition in interface EdifBusNetNamingPolicyname - the bus net name to parse
public java.lang.String getRegexString()
getRegexString in interface EdifBusNetNamingPolicypublic boolean isValidBusNetName(java.lang.String name)
isValidBusNetName in interface EdifBusNetNamingPolicyname - the bus net name to parse
public static void main(java.lang.String[] args)
private java.util.regex.Matcher getMatcher(java.lang.String name)
name - the bus net name to parse
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||