public class CSSCompilationSession extends Object
In order to keep CSS model immutable during semantic analysis, the analysis result such as which rules to keep and which properties to clobber is stored in this auxiliary data structure.
Modifier and Type | Field and Description |
---|---|
Set<ICSSRule> |
activatedRules
A set of rules that will be included in the code generation.
|
List<ICSSDocument> |
cssDocuments
A list of CSS models to be included in the code generation.
|
ArrayList<CSSFontFace> |
fontFaces
A set of font faces that will be included in the code generation.
|
Set<String> |
inheritingStyles
A set of inheriting style names.
|
Map<CSSFunctionCallPropertyValue,EmbedCompilationUnit> |
resolvedEmbedProperties
A map from
Embed() property values to their resolved
EmbedCompilationUnit 's. |
Map<ICSSSelector,String> |
resolvedSelectors
A map of type selectors to their resolved class qnames.
|
Constructor and Description |
---|
CSSCompilationSession()
Initialize a CSS compilation session object.
|
Modifier and Type | Method and Description |
---|---|
void |
disable()
Disables CSS code generation and dependency analysis for this
CSSCompilationSession . |
ICSSCodeGenResult |
emitStyleDataClass(IFlexProject project,
IABCVisitor abcVisitor)
Generate code for CSS data.
|
boolean |
isDisabled() |
boolean |
isKeepAllTypeSelectors() |
protected boolean |
keepRule(ICSSRule newRule)
Determine if a rule should be in the output
|
void |
setKeepAllTypeSelectors(boolean keepAllTypeSelectors)
Set whether to keep all type selectors for linking.
|
protected ICSSDocument |
synthesisNormalizedCSS()
Synthesize a normalized CSS model from the
ICSSRule 's activated
from singleSelectorRules . |
public final Map<CSSFunctionCallPropertyValue,EmbedCompilationUnit> resolvedEmbedProperties
Embed()
property values to their resolved
EmbedCompilationUnit
's.public final Map<ICSSSelector,String> resolvedSelectors
public final Set<ICSSRule> activatedRules
public ArrayList<CSSFontFace> fontFaces
public final List<ICSSDocument> cssDocuments
public CSSCompilationSession()
protected boolean keepRule(ICSSRule newRule)
protected ICSSDocument synthesisNormalizedCSS()
ICSSRule
's activated
from singleSelectorRules
. The normalized CSS
does not have "@namespace" rules; Its rules come from different CSS
documents.public ICSSCodeGenResult emitStyleDataClass(IFlexProject project, IABCVisitor abcVisitor) throws Exception
project
- ICompilerProject
for which code is being
generated.abcVisitor
- IABCVisitor
to which needed abc constructs are
added.Exception
- errorpublic void disable()
CSSCompilationSession
. This method is called from
SWFTarget
when compiling
a SWF that will not have a system manager.public boolean isDisabled()
CSSCompilationSession
, false otherwise.public boolean isKeepAllTypeSelectors()
public void setKeepAllTypeSelectors(boolean keepAllTypeSelectors)
keepAllTypeSelectors
- valueCopyright © 2016 The Apache Software Foundation. All rights reserved.