Class CssFunctionNode
- java.lang.Object
-
- com.google.common.css.compiler.ast.CssNode
-
- com.google.common.css.compiler.ast.CssValueNode
-
- com.google.common.css.compiler.ast.CssFunctionNode
-
- All Implemented Interfaces:
ChunkAware,Locatable
- Direct Known Subclasses:
CssCustomFunctionNode
public class CssFunctionNode extends CssValueNode implements ChunkAware
A node representing a function.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCssFunctionNode.FunctionContains the list of recognized CSS functions.
-
Constructor Summary
Constructors Modifier Constructor Description CssFunctionNode(CssFunctionNode function)Copy constructor.CssFunctionNode(CssFunctionNode.Function function, SourceCodeLocation sourceCodeLocation)Constructor of the class.protectedCssFunctionNode(SourceCodeLocation sourceCodeLocation, CssFunctionNode.Function function)Constructor used by the proxy mechanism, avoids unnecessary arguments node initialization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CssFunctionNodedeepCopy()CssFunctionArgumentsNodegetArguments()java.lang.ObjectgetChunk()Gets the chunk id of the node.CssFunctionNode.FunctiongetFunction()java.lang.StringgetFunctionName()java.lang.StringgetValue()Print the node instead of null when this node is a parameter.voidsetArguments(CssFunctionArgumentsNode arguments)voidsetChunk(java.lang.Object chunk)Sets the chunk id on the node.java.lang.StringtoString()Use for debugging only.-
Methods inherited from class com.google.common.css.compiler.ast.CssValueNode
getIsDefault, setIsDefault, setValue
-
Methods inherited from class com.google.common.css.compiler.ast.CssNode
ancestors, appendComment, deepCopyNodes, equals, getComments, getParent, getShouldBeFlipped, getSourceCodeLocation, getVisitController, hasComment, hashCode, inFunArgs, setComments, setShouldBeFlipped, setSourceCodeLocation
-
-
-
-
Constructor Detail
-
CssFunctionNode
public CssFunctionNode(@Nullable CssFunctionNode.Function function, @Nullable SourceCodeLocation sourceCodeLocation)Constructor of the class.TODO(oana): Deal with the situation that we have an unrecognized function.
- Parameters:
function- functionsourceCodeLocation- sourceCodeLocation
-
CssFunctionNode
public CssFunctionNode(CssFunctionNode function)
Copy constructor.- Parameters:
function- function
-
CssFunctionNode
protected CssFunctionNode(@Nullable SourceCodeLocation sourceCodeLocation, @Nullable CssFunctionNode.Function function)Constructor used by the proxy mechanism, avoids unnecessary arguments node initialization.NOTE(dgajda): The signature of this constructor only differs in argument order from the main constructor of this class.
- Parameters:
function- implementation of the function which is "called" by this nodesourceCodeLocation- location of this node
-
-
Method Detail
-
deepCopy
public CssFunctionNode deepCopy()
- Specified by:
deepCopyin classCssValueNode
-
getFunction
public CssFunctionNode.Function getFunction()
-
getFunctionName
public java.lang.String getFunctionName()
-
getArguments
public CssFunctionArgumentsNode getArguments()
-
setArguments
public void setArguments(CssFunctionArgumentsNode arguments)
-
toString
public java.lang.String toString()
Description copied from class:CssValueNodeUse for debugging only.- Overrides:
toStringin classCssValueNode- See Also:
Object.toString()
-
getChunk
public java.lang.Object getChunk()
Description copied from interface:ChunkAwareGets the chunk id of the node.- Specified by:
getChunkin interfaceChunkAware- Returns:
- the chunk id or
nullif no chunk id was previously set
-
setChunk
public void setChunk(java.lang.Object chunk)
Description copied from interface:ChunkAwareSets the chunk id on the node.- Specified by:
setChunkin interfaceChunkAware- Parameters:
chunk- an object identifying a chunk
-
getValue
public java.lang.String getValue()
Print the node instead of null when this node is a parameter.- Overrides:
getValuein classCssValueNode
-
-