public class MXMLDialect2006 extends MXMLDialect
"http://www.adobe.com/2006/mxml"
.
The special language tags of this dialect are <Binding>
,
<Component>
, <Metadata>
, <Model>
,
<Script>
, and <Style>
.
MXMLDialect.TextParsingFlags
bindingXMLName, componentXMLName, declarationsXMLName, DEFAULT, definitionXMLName, libraryXMLName, metadataXMLName, modelXMLName, MXML_2006, MXML_2009, MXML_2012, privateXMLName, reparentXMLName, scriptXMLName, styleXMLName
Modifier | Constructor and Description |
---|---|
protected |
MXMLDialect2006(String languageNamespace,
int year) |
Modifier and Type | Method and Description |
---|---|
String |
collapseWhitespace(String s,
char replacementChar)
Removes whitespace from the input string and returns a string that
contains at most 1 'replacementChar' character between each word.
|
static MXMLDialect |
getInstance()
Gets the singleton instance of this class.
|
protected boolean |
isArray(String s) |
boolean |
isWhitespace(char c)
Determines whether a character is considered whitespace in this dialect
of MXML.
|
boolean |
isWhitespace(String s)
Determines whether a text String contains only characters that are
considered whitespace in this dialect of MXML.
|
List<Object> |
parseArray(FlexProject project,
String s,
EnumSet<MXMLDialect.TextParsingFlags> flags)
Parses an ActionScript
Array value from a string. |
Boolean |
parseBoolean(FlexProject project,
String s,
EnumSet<MXMLDialect.TextParsingFlags> flags)
Parses an ActionScript
Boolean value from a string. |
Integer |
parseInt(FlexProject project,
String s,
EnumSet<MXMLDialect.TextParsingFlags> flags)
Parses an ActionScript
int value from a string. |
Number |
parseNumber(FlexProject project,
String s,
EnumSet<MXMLDialect.TextParsingFlags> flags)
Parses an ActionScript
Number value from a string. |
Object |
parseObject(FlexProject project,
String s,
EnumSet<MXMLDialect.TextParsingFlags> flags)
Parses an ActionScript value from a string.
|
String |
parseString(FlexProject project,
String s,
EnumSet<MXMLDialect.TextParsingFlags> flags)
Parses an ActionScript
String value from a string. |
Long |
parseUint(FlexProject project,
String s,
EnumSet<MXMLDialect.TextParsingFlags> flags)
Parses an ActionScript
uint value from a string. |
String[] |
splitAndTrim(String s)
Splits a string at commas and then trims whitespace from each part.
|
String |
trim(String s)
Removes any leading and trailing characters from a String that are
considered whitespace in this version of MXML.
|
getDialectForLanguageNamespace, getLanguageNamespace, getMXMLDialect, getNamedEntity, isEqualToOrAfter, isEqualToOrBefore, isLanguageNamespace, resolveArray, resolveBinding, resolveBoolean, resolveClass, resolveComponent, resolveDate, resolveDeclarations, resolveDefinition, resolveFunction, resolveInt, resolveLibrary, resolveMetadata, resolveModel, resolveNumber, resolveObject, resolvePrivate, resolveReparent, resolveScript, resolveString, resolveStyle, resolveUint, resolveXML, resolveXMLList
protected MXMLDialect2006(String languageNamespace, int year)
public static MXMLDialect getInstance()
public boolean isWhitespace(char c)
MXMLDialect
isWhitespace
in class MXMLDialect
c
- The character.true
if the character is whitespace.public boolean isWhitespace(String s)
MXMLDialect
isWhitespace
in class MXMLDialect
s
- The string.public String collapseWhitespace(String s, char replacementChar)
MXMLDialect
This method can be used to strip newlines, tabs, multiple spaces, etc. between words and replace them with a single space.
collapseWhitespace
in class MXMLDialect
s
- The input String.replacementChar
- The character that replaces whitespace between
words.public String trim(String s)
MXMLDialect
trim
in class MXMLDialect
s
- A String.public String[] splitAndTrim(String s)
MXMLDialect
splitAndTrim
in class MXMLDialect
s
- The input string.public Boolean parseBoolean(FlexProject project, String s, EnumSet<MXMLDialect.TextParsingFlags> flags)
MXMLDialect
Boolean
value from a string.parseBoolean
in class MXMLDialect
project
- The FlexProject
within which the MXML is being
parsed.s
- The string to be parsed.flags
- A set of flags controlling the text parsing.Boolean
representing the ActionScript
Boolean
, or null
.public Integer parseInt(FlexProject project, String s, EnumSet<MXMLDialect.TextParsingFlags> flags)
MXMLDialect
int
value from a string.parseInt
in class MXMLDialect
project
- The FlexProject
within which the MXML is being
parsed.s
- The string to be parsed.flags
- A set of flags controlling the text parsing.Integer
representing the ActionScript
int
, or null
.public Long parseUint(FlexProject project, String s, EnumSet<MXMLDialect.TextParsingFlags> flags)
MXMLDialect
uint
value from a string.parseUint
in class MXMLDialect
project
- The FlexProject
within which the MXML is being
parsed.s
- The string to be parsed.flags
- A set of flags controlling the text parsing.Long
representing the ActionScript
uint
, or null
.public Number parseNumber(FlexProject project, String s, EnumSet<MXMLDialect.TextParsingFlags> flags)
MXMLDialect
Number
value from a string.parseNumber
in class MXMLDialect
project
- The FlexProject
within which the MXML is being
parsed.s
- The string to be parsed.flags
- A set of flags controlling the text parsing.Number
representing the ActionScript
Number
, or null
.public String parseString(FlexProject project, String s, EnumSet<MXMLDialect.TextParsingFlags> flags)
MXMLDialect
String
value from a string.parseString
in class MXMLDialect
project
- The FlexProject
within which the MXML is being
parsed.s
- The string to be parsed.flags
- A set of flags controlling the text parsing.String
representing the ActionScript
String
, or null
.public List<Object> parseArray(FlexProject project, String s, EnumSet<MXMLDialect.TextParsingFlags> flags)
MXMLDialect
Array
value from a string.parseArray
in class MXMLDialect
project
- The FlexProject
within which the MXML is being
parsed.s
- The string to be parsed.flags
- A set of flags controlling the text parsing.List
of Java Object
instances
representing the elements of the ActionScript Array
, or
null
.public Object parseObject(FlexProject project, String s, EnumSet<MXMLDialect.TextParsingFlags> flags)
MXMLDialect
parseObject
in class MXMLDialect
project
- The FlexProject
within which the MXML is being
parsed.s
- The string to be parsed.flags
- A set of flags controlling the text parsing.Object
representing the ActionScript value,
or null
.protected boolean isArray(String s)
Copyright © 2016 The Apache Software Foundation. All rights reserved.