public class JConstructor extends JMethod
JMethod.Specialization
HasName.Util
HasJsInfo.JsMemberType
BY_SIGNATURE_COMPARATOR, NULL_METHOD, signature
BY_NAME_COMPARATOR
Constructor and Description |
---|
JConstructor(SourceInfo info,
JClassType enclosingType,
AccessModifier access) |
Modifier and Type | Method and Description |
---|---|
boolean |
canBePolymorphic()
Returns true if this method can participate in virtual dispatch.
|
JMethodBody |
getBody() |
JClassType |
getEnclosingType() |
JReferenceType |
getNewType() |
boolean |
isConstructor() |
boolean |
isDefaultConstructor()
True if the constructor is default, auto-synthesized.
|
boolean |
isEmpty()
Returns
true if this constructor does no real work. |
boolean |
needsDynamicDispatch()
Returns
true if this method can participate in instance
dispatch. |
void |
setDefaultConstructor() |
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
protected Object |
writeReplace() |
addOverriddenMethod, addOverridingMethod, addThrownException, addThrownExceptions, canBeImplementedExternally, canBeReferencedExternally, cloneParameter, createFinalParameter, createParameter, createParameter, createThisParameter, disallowDevirtualization, exposesNonJsMember, exposesPackagePrivateMethod, freezeParamTypes, getAccess, getExternalizedMethod, getInliningMode, getJsMemberType, getJsName, getJsNamespace, getJsniSignature, getName, getOriginalParamTypes, getOriginalReturnType, getOverriddenMethods, getOverridingMethods, getParams, getQualifiedJsName, getQualifiedName, getSignature, getSpecialization, getSuppressedWarnings, getThrownExceptions, getType, hasSideEffects, isAbstract, isDefaultMethod, isDevirtualizationAllowed, isExternal, isFinal, isForwarding, isInliningAllowed, isJsConstructor, isJsInteropEntryPoint, isJsMethodVarargs, isJsNative, isJsniMethod, isJsOverlay, isOrOverridesJsFunctionMethod, isPackagePrivate, isPrivate, isPublic, isStatic, isSynthetic, isSyntheticAccidentalOverride, removeParam, removeSpecialization, resolve, setAbstract, setBody, setDefaultMethod, setFinal, setFinal, setForwarding, setHasSideEffects, setInliningMode, setJsMemberInfo, setJsOverlay, setOriginalTypes, setSpecialization, setSuppressedWarnings, setSynthetic, setSyntheticAccidentalOverride, setType, visitChildren
getSourceInfo, setSourceInfo, toSource, toString
getSourceInfo
public JConstructor(SourceInfo info, JClassType enclosingType, AccessModifier access)
public void setDefaultConstructor()
public boolean isDefaultConstructor()
public boolean canBePolymorphic()
JMethod
canBePolymorphic
in class JMethod
public JMethodBody getBody()
public JClassType getEnclosingType()
getEnclosingType
in interface HasEnclosingType
getEnclosingType
in class JMethod
public JReferenceType getNewType()
public boolean isConstructor()
isConstructor
in class JMethod
public boolean isEmpty()
true
if this constructor does no real work.
NOTE: this method does NOT account for any clinits that would be triggered
if this constructor is the target of a new instance operation from an
external class.
TODO(scottb): make this method less expensive by computing in an external
visitor.public boolean needsDynamicDispatch()
JMethod
true
if this method can participate in instance
dispatch.needsDynamicDispatch
in interface JMember
needsDynamicDispatch
in class JMethod
public void traverse(JVisitor visitor, Context ctx)
JNode
protected Object writeReplace()
writeReplace
in class JMethod
Copyright © 2018. All rights reserved.