Package com.tonic.analysis.source.lower
Class SyntheticArrayConstructor
- java.lang.Object
-
- com.tonic.analysis.source.lower.SyntheticArrayConstructor
-
public class SyntheticArrayConstructor extends Object
A synthetic array-allocating method pending materialization; its descriptor takes a single int length and returns the array type.
-
-
Constructor Summary
Constructors Constructor Description SyntheticArrayConstructor(String name, SourceType elementType, int dimensions)Creates the synthetic array-constructor description and derives its descriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetArrayTypeDescriptor()StringgetDescriptor()intgetDimensions()SourceTypegetElementType()StringgetName()booleanisPrimitiveArray()
-
-
-
Constructor Detail
-
SyntheticArrayConstructor
public SyntheticArrayConstructor(String name, SourceType elementType, int dimensions)
Creates the synthetic array-constructor description and derives its descriptor.- Parameters:
name- the synthetic method nameelementType- the array element typedimensions- the number of array dimensions
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name
-
getDescriptor
public String getDescriptor()
- Returns:
- the descriptor
-
getElementType
public SourceType getElementType()
- Returns:
- the element type
-
getDimensions
public int getDimensions()
- Returns:
- the dimensions
-
getArrayTypeDescriptor
public String getArrayTypeDescriptor()
- Returns:
- the descriptor of the constructed array type
-
isPrimitiveArray
public boolean isPrimitiveArray()
- Returns:
- true if the element type is primitive
-
-