Class JavaStubGenerator
java.lang.Object
gw.internal.gosu.parser.java.compiler.JavaStubGenerator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
private void
genAnnotation
(IGosuClass type, StringBuilder sb) private void
genAnnotations
(StringBuilder sb, List<? extends IAnnotationInfo> annotations) private String
genClassExtends
(IGosuClass type) private void
genClassFeatures
(StringBuilder sb, IGosuClassInternal gsClass) private String
genClassImplements
(IGosuClass type) private void
genClassOrInterface
(IGosuClass type, StringBuilder sb) private String
genCompileTimeConstantExpression
(IType type, Object value) private void
genConstructors
(StringBuilder sb, IGosuClassInternal gsClass, GosuClassParseInfo parseInfo) private void
genEnum
(IGosuClass type, StringBuilder sb) private void
genEnumConstants
(StringBuilder sb, IGosuClassInternal gsClass) private void
genFields
(StringBuilder sb, IGosuClassInternal gsClass, GosuClassParseInfo parseInfo) private String
genFieldValue
(IAnnotationInfo ai, IType fieldType, String fieldName) private void
genInnerClasses
(StringBuilder sb, IGosuClassInternal gsClass) private void
genMethod
(StringBuilder sb, IGosuClassInternal gsClass, DynamicFunctionSymbol method) private void
genMethod
(StringBuilder sb, IGosuClassInternal gsClass, DynamicFunctionSymbol method, String name) private void
genMethods
(StringBuilder sb, IGosuClassInternal gsClass, GosuClassParseInfo parseInfo) private void
genMethods
(StringBuilder sb, IGosuClassInternal gsClass, Collection<DynamicFunctionSymbol> methods) (package private) void
genModifiers
(StringBuilder sb, int mod, boolean isDefault, int defModifier) private void
genPackage
(IGosuClass type, StringBuilder sb) private void
private void
genProperties
(StringBuilder sb, IGosuClassInternal gsClass, GosuClassParseInfo parseInfo) private void
genProperties
(StringBuilder sb, IGosuClassInternal gsClass, Collection<DynamicPropertySymbol> properties) private void
genReturnStmt
(StringBuilder sb, IType returnType) genStub
(IGosuClass type) private void
genType
(IGosuClass type, StringBuilder sb) private String
getFunctionalInterface
(IFunctionType funcType) private String
getTypeName
(IType type) static int
private String
getTypeVariables
(IType type) private static int
static JavaStubGenerator
instance()
private boolean
private String
makeDefaultPrimitiveValue
(IType returnType) private boolean
shouldImplement
(IType iface, IGosuClass gsClass)
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
JavaStubGenerator
private JavaStubGenerator()
-
-
Method Details
-
instance
-
genStub
-
genType
-
genPackage
-
genAnnotation
-
genEnum
-
genEnumConstants
-
genClassOrInterface
-
genClassFeatures
-
genClassImplements
-
shouldImplement
-
genClassExtends
-
getTypeVariables
-
genInnerClasses
-
genFields
-
genConstructors
private void genConstructors(StringBuilder sb, IGosuClassInternal gsClass, GosuClassParseInfo parseInfo) -
genProperties
private void genProperties(StringBuilder sb, IGosuClassInternal gsClass, GosuClassParseInfo parseInfo) -
genProperties
private void genProperties(StringBuilder sb, IGosuClassInternal gsClass, Collection<DynamicPropertySymbol> properties) -
genMethods
-
genMethods
private void genMethods(StringBuilder sb, IGosuClassInternal gsClass, Collection<DynamicFunctionSymbol> methods) -
genMethod
-
genMethod
private void genMethod(StringBuilder sb, IGosuClassInternal gsClass, DynamicFunctionSymbol method, String name) -
isBuiltinStaticEnumMethod
-
genAnnotations
-
genFieldValue
-
genCompileTimeConstantExpression
-
genReturnStmt
-
makeDefaultPrimitiveValue
-
genParameters
-
addReifiedTypeParamaters
-
getTypeVarCountForDFS
-
getTypeVarsForEnhancement
-
genModifiers
-
getTypeName
-
getFunctionalInterface
-