public class JConstructor extends JMethod
JMethod.SpecializationHasName.UtilHasJsInfo.JsMemberTypeBY_SIGNATURE_COMPARATOR, NULL_METHOD, signatureBY_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, visitChildrengetSourceInfo, setSourceInfo, toSource, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSourceInfopublic JConstructor(SourceInfo info, JClassType enclosingType, AccessModifier access)
public void setDefaultConstructor()
public boolean isDefaultConstructor()
public boolean canBePolymorphic()
JMethodcanBePolymorphic in class JMethodpublic JMethodBody getBody()
public JClassType getEnclosingType()
getEnclosingType in interface HasEnclosingTypegetEnclosingType in class JMethodpublic JReferenceType getNewType()
public boolean isConstructor()
isConstructor in class JMethodpublic 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()
JMethodtrue if this method can participate in instance
dispatch.needsDynamicDispatch in interface JMemberneedsDynamicDispatch in class JMethodpublic void traverse(JVisitor visitor, Context ctx)
JNodeprotected Object writeReplace()
writeReplace in class JMethodCopyright © 2018. All rights reserved.