本文整理了Java中gw.lang.parser.Keyword.toString()
方法的一些代码示例,展示了Keyword.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Keyword.toString()
方法的具体详情如下:
包路径:gw.lang.parser.Keyword
类名称:Keyword
方法名:toString
暂无
代码示例来源:origin: org.gosu-lang.gosu/gosu-core
@Override
public String toString()
{
return Keyword.KW_null.toString();
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-core
public String getDisplayName()
{
return Keyword.KW_super.toString();
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-core
public String getDisplayName()
{
return Keyword.KW_this.toString();
}
代码示例来源:origin: gosu-lang/old-gosu-repo
public String getDisplayName()
{
return Keyword.KW_this.toString();
}
代码示例来源:origin: gosu-lang/old-gosu-repo
@Override
public String toString()
{
return Keyword.KW_null.toString();
}
代码示例来源:origin: gosu-lang/old-gosu-repo
public String getDisplayName()
{
return Keyword.KW_super.toString();
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-lab
private void fixConstructorSyntax()
{
try
{
Document document = _editor.getDocument();
document.remove( _obsoleteCtorStart, _obsoleteCtorEnd - _obsoleteCtorStart );
document.insertString( _obsoleteCtorStart, Keyword.KW_construct.toString(), null );
_editor.setCaretPosition( _obsoleteCtorStart + Keyword.KW_construct.toString().length() );
}
catch( BadLocationException e )
{
//ignore
}
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-editor
private void fixConstructorSyntax()
{
try
{
Document document = _editor.getDocument();
document.remove( _obsoleteCtorStart, _obsoleteCtorEnd - _obsoleteCtorStart );
document.insertString( _obsoleteCtorStart, Keyword.KW_construct.toString(), null );
_editor.setCaretPosition( _obsoleteCtorStart + Keyword.KW_construct.toString().length() );
}
catch( BadLocationException e )
{
//ignore
}
}
代码示例来源:origin: gosu-lang/old-gosu-repo
public static boolean matchDeclarationKeyword( Token T, boolean bPeek, SourceCodeTokenizer tokenizer )
{
return
match( T, Keyword.KW_construct.toString(), SourceCodeTokenizer.TT_KEYWORD, bPeek, tokenizer ) ||
match( T, Keyword.KW_function.toString(), SourceCodeTokenizer.TT_KEYWORD, bPeek, tokenizer ) ||
match( T, Keyword.KW_property.toString(), SourceCodeTokenizer.TT_KEYWORD, bPeek, tokenizer ) ||
match( T, Keyword.KW_var.toString(), SourceCodeTokenizer.TT_KEYWORD, bPeek, tokenizer ) ||
match( T, Keyword.KW_delegate.toString(), SourceCodeTokenizer.TT_KEYWORD, bPeek, tokenizer ) ||
match( T, Keyword.KW_class.toString(), SourceCodeTokenizer.TT_KEYWORD, bPeek, tokenizer ) ||
match( T, Keyword.KW_interface.toString(), SourceCodeTokenizer.TT_KEYWORD, bPeek, tokenizer ) ||
match( T, Keyword.KW_structure.toString(), SourceCodeTokenizer.TT_KEYWORD, bPeek, tokenizer ) ||
match( T, Keyword.KW_enum.toString(), SourceCodeTokenizer.TT_KEYWORD, bPeek, tokenizer );
}
代码示例来源:origin: gosu-lang/old-gosu-repo
private ClassType getClassType( String strValue )
{
return
Keyword.KW_class.toString().equals( strValue )
? ClassType.Class
: Keyword.KW_interface.equals( strValue )
? ClassType.Interface
: Keyword.KW_structure.equals( strValue )
? ClassType.Structure
: Keyword.KW_enum.toString().equals( strValue )
? ClassType.Enum
: null;
}
代码示例来源:origin: gosu-lang/old-gosu-repo
public boolean canBeCaptured()
{
return isStackSymbol() &&
!getName().equals( Keyword.KW_this.toString() ) &&
!getName().equals( Keyword.KW_super.toString() );
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-core
public boolean canBeCaptured()
{
return isStackSymbol() &&
!getName().equals( Keyword.KW_this.toString() ) &&
!getName().equals( Keyword.KW_super.toString() );
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-core
private ClassType getClassType( String strValue )
{
return
Keyword.KW_class.toString().equals( strValue )
? ClassType.Class
: Keyword.KW_interface.equals( strValue )
? ClassType.Interface
: Keyword.KW_annotation.equals( strValue )
? ClassType.Annotation
: Keyword.KW_structure.equals( strValue )
? ClassType.Structure
: Keyword.KW_enum.toString().equals( strValue )
? ClassType.Enum
: null;
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-core
public List<? extends IInvocableType> getFunctionTypes( String name )
{
if( name.equals( Keyword.KW_construct.toString() ) )
{
return getConstructorTypes();
}
else
{
return getMethodTypes( name );
}
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-core
LengthProperty(ITypeInfo typeInfo) throws IntrospectionException
{
super( typeInfo, new JavaSourcePropertyDescriptor( Keyword.KW_length.toString(), JavaTypes.pINT(), null, null ) );
_accessor = LengthAccessor.INSTANCE;
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-core
private void addArrayProperties(List<IPropertyInfo> ret) {
if ( getOwnersType().isArray()) {
for (Iterator<IPropertyInfo> iterator = ret.iterator(); iterator.hasNext();) {
IPropertyInfo propertyInfo = iterator.next();
if (propertyInfo.getName().equals(Keyword.KW_length.toString())) {
iterator.remove();
}
}
IPropertyInfo lengthProperty = GosuShop.createPropertyDelegate(JavaTypeInfo.this, GosuShop.createLengthProperty(JavaTypeInfo.this));
ret.add(lengthProperty);
}
}
代码示例来源:origin: gosu-lang/old-gosu-repo
private void addArrayProperties(List<IPropertyInfo> ret) {
if ( getOwnersType().isArray()) {
for (Iterator<IPropertyInfo> iterator = ret.iterator(); iterator.hasNext();) {
IPropertyInfo propertyInfo = iterator.next();
if (propertyInfo.getName().equals(Keyword.KW_length.toString())) {
iterator.remove();
}
}
IPropertyInfo lengthProperty = GosuShop.createPropertyDelegate(JavaTypeInfo.this, GosuShop.createLengthProperty(JavaTypeInfo.this));
ret.add(lengthProperty);
}
}
代码示例来源:origin: gosu-lang/old-gosu-repo
LengthProperty(ITypeInfo typeInfo) throws IntrospectionException
{
super( typeInfo,
new PropertyDescriptorJavaPropertyDescriptor(new PropertyDescriptor( Keyword.KW_length.toString(), null, null )
{
@Override
public Class getPropertyType()
{
return Integer.TYPE;
}
} , TypeSystem.getCurrentModule()));
_accessor = LengthAccessor.INSTANCE;
}
代码示例来源:origin: gosu-lang/old-gosu-repo
private static IType getType(String strType, ITypeUsesMap _typeUsesMap) throws ClassNotFoundException {
if( strType.contains( "<" ) || strType.startsWith( Keyword.KW_block.toString() ) )
{
return TypeSystem.parseType(strType, new TypeVarToTypeMap(), _typeUsesMap);
}
else if ( strType.startsWith( "entity." ) )
{
return TypeSystem.getByFullName( strType );
}
else if (strType.endsWith("[]")) {
String baseTypeName = strType.substring(0, strType.length() - 2);
IType baseType = getType(baseTypeName, _typeUsesMap);
return (baseType == null) ? null : baseType.getArrayType();
}
else {
return _typeUsesMap == null
? TypeSystem.getByRelativeName( strType )
: TypeSystem.getByRelativeName( strType, _typeUsesMap );
}
}
}
代码示例来源:origin: gosu-lang/old-gosu-repo
boolean match( Token T, Keyword token, boolean bPeek )
{
boolean bMatch = false;
if( T != null )
{
getTokenizer().copyInto( T );
}
SourceCodeTokenizer tokenizer = getTokenizer();
if( SourceCodeTokenizer.TT_KEYWORD == tokenizer.getType() )
{
bMatch = token.toString().equals( tokenizer.getStringValue() );
}
if( bMatch && !bPeek )
{
tokenizer.nextToken();
}
return bMatch;
}
内容来源于网络,如有侵权,请联系作者删除!