Class UserAgent.MutableUserAgent
java.lang.Object
nl.basjes.parse.useragent.parser.UserAgentBaseListener
nl.basjes.parse.useragent.UserAgent.MutableUserAgent
- All Implemented Interfaces:
Serializable, UserAgentListener, UserAgent, DefaultANTLRErrorListener
- Direct Known Subclasses:
DebugUserAgent
- Enclosing interface:
UserAgent
public static class UserAgent.MutableUserAgent
extends UserAgentBaseListener
implements UserAgent, Serializable, DefaultANTLRErrorListener
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface UserAgent
UserAgent.ImmutableUserAgent, UserAgent.MutableUserAgent -
Field Summary
Fields inherited from interface UserAgent
AGENT_BUILD, AGENT_CLASS, AGENT_INFORMATION_EMAIL, AGENT_INFORMATION_URL, AGENT_LANGUAGE, AGENT_LANGUAGE_CODE, AGENT_NAME, AGENT_NAME_VERSION, AGENT_NAME_VERSION_MAJOR, AGENT_SECURITY, AGENT_UUID, AGENT_VERSION, AGENT_VERSION_MAJOR, DEVICE_BRAND, DEVICE_CLASS, DEVICE_CPU, DEVICE_CPU_BITS, DEVICE_FIRMWARE_VERSION, DEVICE_NAME, DEVICE_VERSION, FACEBOOK_CARRIER, FACEBOOK_DEVICE_CLASS, FACEBOOK_DEVICE_NAME, FACEBOOK_DEVICE_VERSION, FACEBOOK_F_B_O_P, FACEBOOK_F_B_S_S, FACEBOOK_OPERATING_SYSTEM_NAME, FACEBOOK_OPERATING_SYSTEM_VERSION, HACKER_ATTACK_VECTOR, HACKER_TOOLKIT, IE_COMPATIBILITY_NAME_VERSION, IE_COMPATIBILITY_NAME_VERSION_MAJOR, IE_COMPATIBILITY_VERSION, IE_COMPATIBILITY_VERSION_MAJOR, KOBO_AFFILIATE, KOBO_PLATFORM_ID, LAYOUT_ENGINE_BUILD, LAYOUT_ENGINE_CLASS, LAYOUT_ENGINE_NAME, LAYOUT_ENGINE_NAME_VERSION, LAYOUT_ENGINE_NAME_VERSION_MAJOR, LAYOUT_ENGINE_VERSION, LAYOUT_ENGINE_VERSION_MAJOR, NETWORK_TYPE, NULL_VALUE, OPERATING_SYSTEM_CLASS, OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME_VERSION, OPERATING_SYSTEM_NAME_VERSION_MAJOR, OPERATING_SYSTEM_VERSION, OPERATING_SYSTEM_VERSION_BUILD, OPERATING_SYSTEM_VERSION_MAJOR, PRE_SORTED_FIELDS_LIST, REMARKABLE_PATTERN, SET_ALL_FIELDS, STANDARD_FIELDS, SYNTAX_ERROR, UACLIENT_HINT_ARCHITECTURE, UACLIENT_HINT_BITNESS, UACLIENT_HINT_BRANDS, UACLIENT_HINT_FORMFACTORS, UACLIENT_HINT_FULL_VERSION, UACLIENT_HINT_FULL_VERSION_LIST, UACLIENT_HINT_MOBILE, UACLIENT_HINT_MODEL, UACLIENT_HINT_PLATFORM, UACLIENT_HINT_PLATFORM_VERSION, UACLIENT_HINT_WOW_64, UNKNOWN_NAME_VERSION, UNKNOWN_VALUE, UNKNOWN_VERSION, USERAGENT_FIELDNAME, USERAGENT_HEADER, USERAGENT_HEADER_FIELDNAME, USERAGENT_HEADER_SPEC, USERAGENT_HEADER_SPEC_URL, WEBVIEW_APP_NAME, WEBVIEW_APP_NAME_VERSION, WEBVIEW_APP_NAME_VERSION_MAJOR, WEBVIEW_APP_VERSION, WEBVIEW_APP_VERSION_MAJOR -
Constructor Summary
ConstructorsConstructorDescriptionMutableUserAgent(String userAgentString) MutableUserAgent(String userAgentString, Collection<String> wantedFieldNames) MutableUserAgent(Collection<String> wantedFieldNames) MutableUserAgent(UserAgent.ImmutableUserAgent userAgent) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoiddestroy()booleanintgetConfidence(String fieldName) booleaninthashCode()booleanbooleanisDebug()static booleanisSystemField(String fieldname) voidvoidreportAmbiguity(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.dfa.DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, org.antlr.v4.runtime.atn.ATNConfigSet configs) voidreset()voidvoidset(UserAgent.MutableUserAgent newValuesUserAgent, Matcher appliedMatcher) voidsetDebug(boolean newDebug) voidvoidsetHeaders(Map<String, String> newHeaders) voidsetUserAgentString(String newUserAgentString) voidsyntaxError(org.antlr.v4.runtime.Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, org.antlr.v4.runtime.RecognitionException e) toString()Methods inherited from class UserAgentBaseListener
enterBase64, enterCommentBlock, enterCommentEntry, enterCommentProduct, enterCommentSeparator, enterEmailAddress, enterEmptyWord, enterEveryRule, enterKeyName, enterKeyValue, enterKeyValueProductVersionName, enterKeyValueVersionName, enterKeyWithoutValue, enterMultipleWords, enterProduct, enterProductName, enterProductNameEmail, enterProductNameKeyValue, enterProductNameNoVersion, enterProductNameUrl, enterProductNameUuid, enterProductNameVersion, enterProductNameWords, enterProductVersion, enterProductVersionSingleWord, enterProductVersionWithCommas, enterProductVersionWords, enterRootElements, enterRootText, enterSingleVersion, enterSingleVersionWithCommas, enterSiteUrl, enterUserAgent, enterUuId, enterVersionWords, exitBase64, exitCommentBlock, exitCommentEntry, exitCommentProduct, exitCommentSeparator, exitEmailAddress, exitEmptyWord, exitEveryRule, exitKeyName, exitKeyValue, exitKeyValueProductVersionName, exitKeyValueVersionName, exitKeyWithoutValue, exitMultipleWords, exitProduct, exitProductName, exitProductNameEmail, exitProductNameKeyValue, exitProductNameNoVersion, exitProductNameUrl, exitProductNameUuid, exitProductNameVersion, exitProductNameWords, exitProductVersion, exitProductVersionSingleWord, exitProductVersionWithCommas, exitProductVersionWords, exitRootElements, exitRootText, exitSingleVersion, exitSingleVersionWithCommas, exitSiteUrl, exitUserAgent, exitUuId, exitVersionWords, visitErrorNode, visitTerminalMethods inherited from interface DefaultANTLRErrorListener
reportAttemptingFullContext, reportContextSensitivityMethods inherited from interface UserAgent
escapeYaml, getCleanedAvailableFieldNamesSorted, toJavaExpectationsList, toJavaExpectationsList, toJavaTestCase, toJavaTestCase, toJson, toJson, toJson, toMap, toMap, toMap, toString, toString, toXML, toXML, toXML, toYamlTestCase, toYamlTestCase, toYamlTestCase, toYamlTestCase, toYamlTestCase, toYamlTestCase, uaEquals, uaHashCode
-
Constructor Details
-
MutableUserAgent
public MutableUserAgent() -
MutableUserAgent
-
MutableUserAgent
-
MutableUserAgent
-
MutableUserAgent
-
-
Method Details
-
destroy
public void destroy() -
hasSyntaxError
public boolean hasSyntaxError()- Specified by:
hasSyntaxErrorin interfaceUserAgent
-
hasAmbiguity
public boolean hasAmbiguity()- Specified by:
hasAmbiguityin interfaceUserAgent
-
getAmbiguityCount
public int getAmbiguityCount()- Specified by:
getAmbiguityCountin interfaceUserAgent
-
syntaxError
-
reportAmbiguity
public void reportAmbiguity(org.antlr.v4.runtime.Parser recognizer, org.antlr.v4.runtime.dfa.DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, org.antlr.v4.runtime.atn.ATNConfigSet configs) - Specified by:
reportAmbiguityin interfaceDefaultANTLRErrorListener
-
isDebug
public boolean isDebug() -
setDebug
public void setDebug(boolean newDebug) -
equals
-
hashCode
-
setUserAgentString
-
getUserAgentString
- Specified by:
getUserAgentStringin interfaceUserAgent
-
getHeaders
- Specified by:
getHeadersin interfaceUserAgent
-
setHeaders
-
addHeader
-
addHeader
-
reset
public void reset() -
isSystemField
-
processSetAll
public void processSetAll() -
set
-
setForced
-
set
-
get
-
getValue
-
getConfidence
- Specified by:
getConfidencein interfaceUserAgent
-
getAvailableFieldNamesSorted
- Specified by:
getAvailableFieldNamesSortedin interfaceUserAgent
-
toString
-