Class ResolvableType
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.writer.ResolvableType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypedValueImplasValue(boolean value)Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImplasValue(byte value)Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImplasValue(char value)Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImplasValue(double value)Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImplasValue(float value)Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImplasValue(int value)Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImplasValue(long value)Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImplasValue(short value)Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImplasValue(Object value)TypedValueImplasValue(String value)Shortcut for wrapping the given value instance as a TypedValue objectTypedValueImplasValue(Consumer<TypedValueBuilder> builderCallback)Shortcut for creating a new TypedValue object for this typebooleancanAccept(Object value)Checks whether the type can accept the given valuebooleanequals(Object o)List<Annotation>getAnnotations()TypedFieldImplgetField(String name)List<TypedFieldImpl>getFields()longgetId()StringgetSupertype()StringgetTypeName()TypesImplgetTypes()booleanhasConstantPool()inthashCode()booleanisBuiltin()booleanisResolved()booleanisSame(NamedType other)booleanisSimple()A simple type has only one field which is of a built-in typebooleanisUsedBy(Type other)Checks whether this particular type is used as a field type in the other type.TypedValueImplnullValue()StringtoString()TypedValueBuilderImplvalueBuilder()
-
-
-
Method Detail
-
isResolved
public boolean isResolved()
- Specified by:
isResolvedin interfaceType- Returns:
- true if the type is fully resolved
-
hasConstantPool
public boolean hasConstantPool()
- Specified by:
hasConstantPoolin interfaceType- Returns:
- is the type using constant pool
-
asValue
public TypedValueImpl asValue(String value)
Description copied from interface:TypeShortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValuein interfaceType- Specified by:
asValuein interfaceTypeImpl- Parameters:
value- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(byte value)
Description copied from interface:TypeShortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValuein interfaceType- Specified by:
asValuein interfaceTypeImpl- Parameters:
value- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(char value)
Description copied from interface:TypeShortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValuein interfaceType- Specified by:
asValuein interfaceTypeImpl- Parameters:
value- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(short value)
Description copied from interface:TypeShortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValuein interfaceType- Specified by:
asValuein interfaceTypeImpl- Parameters:
value- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(int value)
Description copied from interface:TypeShortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValuein interfaceType- Specified by:
asValuein interfaceTypeImpl- Parameters:
value- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(long value)
Description copied from interface:TypeShortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValuein interfaceType- Specified by:
asValuein interfaceTypeImpl- Parameters:
value- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(float value)
Description copied from interface:TypeShortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValuein interfaceType- Specified by:
asValuein interfaceTypeImpl- Parameters:
value- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(double value)
Description copied from interface:TypeShortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValuein interfaceType- Specified by:
asValuein interfaceTypeImpl- Parameters:
value- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(boolean value)
Description copied from interface:TypeShortcut for wrapping the given value instance as a TypedValue object- Specified by:
asValuein interfaceType- Specified by:
asValuein interfaceTypeImpl- Parameters:
value- the value to wrap- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(Consumer<TypedValueBuilder> builderCallback)
Description copied from interface:TypeShortcut for creating a new TypedValue object for this type- Specified by:
asValuein interfaceType- Specified by:
asValuein interfaceTypeImpl- Parameters:
builderCallback- will be called when the new TypedValue is being initialized- Returns:
- a TypedValue object representing the typed value
-
asValue
public TypedValueImpl asValue(Object value)
-
nullValue
public TypedValueImpl nullValue()
- Specified by:
nullValuein interfaceType- Specified by:
nullValuein interfaceTypeImpl- Returns:
- a specific TypedValue instance designated as the null value for this type
-
isBuiltin
public boolean isBuiltin()
-
isSimple
public boolean isSimple()
Description copied from interface:TypeA simple type has only one field which is of a built-in type
-
getSupertype
public String getSupertype()
- Specified by:
getSupertypein interfaceType- Returns:
- the super type - may be null
-
getFields
public List<TypedFieldImpl> getFields()
-
getField
public TypedFieldImpl getField(String name)
-
getAnnotations
public List<Annotation> getAnnotations()
- Specified by:
getAnnotationsin interfaceType- Returns:
- attached annotations
-
canAccept
public boolean canAccept(Object value)
Description copied from interface:TypeChecks whether the type can accept the given value
-
getTypeName
public String getTypeName()
- Specified by:
getTypeNamein interfaceNamedType- Returns:
- the type name
-
isSame
public boolean isSame(NamedType other)
-
isUsedBy
public boolean isUsedBy(Type other)
Description copied from interface:TypeChecks whether this particular type is used as a field type in the other type.
-
getTypes
public TypesImpl getTypes()
-
valueBuilder
public TypedValueBuilderImpl valueBuilder()
- Specified by:
valueBuilderin interfaceType- Specified by:
valueBuilderin interfaceTypeImpl- Returns:
- a new TypedValueBuilder instance for a value of this particular type
-
-