当前位置: 首页>>代码示例>>Java>>正文


Java MemberReference.getErasedSignature方法代码示例

本文整理汇总了Java中com.strobel.assembler.metadata.MemberReference.getErasedSignature方法的典型用法代码示例。如果您正苦于以下问题:Java MemberReference.getErasedSignature方法的具体用法?Java MemberReference.getErasedSignature怎么用?Java MemberReference.getErasedSignature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.strobel.assembler.metadata.MemberReference的用法示例。


在下文中一共展示了MemberReference.getErasedSignature方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visitMemberReferenceExpression

import com.strobel.assembler.metadata.MemberReference; //导入方法依赖的package包/类
@Override
public Void visitMemberReferenceExpression(MemberReferenceExpression node, SourceIndex index) {
	MemberReference ref = node.getUserData(Keys.MEMBER_REFERENCE);
	if (ref != null) {
		// make sure this is actually a field
		if (ref.getErasedSignature().indexOf('(') >= 0) {
			throw new Error("Expected a field here! got " + ref);
		}
		
		ClassEntry classEntry = new ClassEntry(ref.getDeclaringType().getInternalName());
		FieldEntry fieldEntry = new FieldEntry(classEntry, ref.getName(), new Type(ref.getErasedSignature()));
		index.addReference(node.getMemberNameToken(), fieldEntry, m_behaviorEntry);
	}
	
	return recurse(node, index);
}
 
开发者ID:cccssw,项目名称:enigma-vk,代码行数:17,代码来源:SourceIndexBehaviorVisitor.java

示例2: visitMemberReferenceExpression

import com.strobel.assembler.metadata.MemberReference; //导入方法依赖的package包/类
@Override
public Void visitMemberReferenceExpression(MemberReferenceExpression node,
	SourceIndex index)
{
	MemberReference ref = node.getUserData(Keys.MEMBER_REFERENCE);
	if(ref != null)
	{
		// make sure this is actually a field
		if(ref.getErasedSignature().indexOf('(') >= 0)
			throw new Error("Expected a field here! got " + ref);
		
		ClassEntry classEntry =
			new ClassEntry(ref.getDeclaringType().getInternalName());
		FieldEntry fieldEntry =
			new FieldEntry(classEntry, ref.getName(), new Type(
				ref.getErasedSignature()));
		index.addReference(node.getMemberNameToken(), fieldEntry,
			m_behaviorEntry);
	}
	
	return recurse(node, index);
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-Enigma,代码行数:23,代码来源:SourceIndexBehaviorVisitor.java

示例3: visitIdentifierExpression

import com.strobel.assembler.metadata.MemberReference; //导入方法依赖的package包/类
@Override
public Void visitIdentifierExpression(IdentifierExpression node,
	SourceIndex index)
{
	MemberReference ref = node.getUserData(Keys.MEMBER_REFERENCE);
	if(ref != null)
	{
		ClassEntry classEntry =
			new ClassEntry(ref.getDeclaringType().getInternalName());
		FieldEntry fieldEntry =
			new FieldEntry(classEntry, ref.getName(), new Type(
				ref.getErasedSignature()));
		index.addReference(node.getIdentifierToken(), fieldEntry,
			m_behaviorEntry);
	}
	
	return recurse(node, index);
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-Enigma,代码行数:19,代码来源:SourceIndexBehaviorVisitor.java

示例4: visitObjectCreationExpression

import com.strobel.assembler.metadata.MemberReference; //导入方法依赖的package包/类
@Override
public Void visitObjectCreationExpression(ObjectCreationExpression node,
	SourceIndex index)
{
	MemberReference ref = node.getUserData(Keys.MEMBER_REFERENCE);
	if(ref != null)
	{
		ClassEntry classEntry =
			new ClassEntry(ref.getDeclaringType().getInternalName());
		ConstructorEntry constructorEntry =
			new ConstructorEntry(classEntry, new Signature(
				ref.getErasedSignature()));
		if(node.getType() instanceof SimpleType)
		{
			SimpleType simpleTypeNode = (SimpleType)node.getType();
			index.addReference(simpleTypeNode.getIdentifierToken(),
				constructorEntry, m_behaviorEntry);
		}
	}
	
	return recurse(node, index);
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-Enigma,代码行数:23,代码来源:SourceIndexBehaviorVisitor.java

示例5: visitIdentifierExpression

import com.strobel.assembler.metadata.MemberReference; //导入方法依赖的package包/类
@Override
public Void visitIdentifierExpression(IdentifierExpression node, SourceIndex index) {
	MemberReference ref = node.getUserData(Keys.MEMBER_REFERENCE);
	if (ref != null) {
		ClassEntry classEntry = new ClassEntry(ref.getDeclaringType().getInternalName());
		FieldEntry fieldEntry = new FieldEntry(classEntry, ref.getName(), new Type(ref.getErasedSignature()));
		index.addReference(node.getIdentifierToken(), fieldEntry, m_behaviorEntry);
	}
	
	return recurse(node, index);
}
 
开发者ID:cccssw,项目名称:enigma-vk,代码行数:12,代码来源:SourceIndexBehaviorVisitor.java

示例6: visitObjectCreationExpression

import com.strobel.assembler.metadata.MemberReference; //导入方法依赖的package包/类
@Override
public Void visitObjectCreationExpression(ObjectCreationExpression node, SourceIndex index) {
	MemberReference ref = node.getUserData(Keys.MEMBER_REFERENCE);
	if (ref != null) {
		ClassEntry classEntry = new ClassEntry(ref.getDeclaringType().getInternalName());
		ConstructorEntry constructorEntry = new ConstructorEntry(classEntry, new Signature(ref.getErasedSignature()));
		if (node.getType() instanceof SimpleType) {
			SimpleType simpleTypeNode = (SimpleType)node.getType();
			index.addReference(simpleTypeNode.getIdentifierToken(), constructorEntry, m_behaviorEntry);
		}
	}
	
	return recurse(node, index);
}
 
开发者ID:cccssw,项目名称:enigma-vk,代码行数:15,代码来源:SourceIndexBehaviorVisitor.java

示例7: MemberInfo

import com.strobel.assembler.metadata.MemberReference; //导入方法依赖的package包/类
public MemberInfo(MemberReference mr) {
    this.type = new TypeInfo(mr.getDeclaringType().getInternalName());
    this.name = mr.getName();
    this.signature = mr.getErasedSignature();
}
 
开发者ID:amaembo,项目名称:huntbugs,代码行数:6,代码来源:WarningAnnotation.java

示例8: visitInvocationExpression

import com.strobel.assembler.metadata.MemberReference; //导入方法依赖的package包/类
@Override
public Void visitInvocationExpression(InvocationExpression node,
	SourceIndex index)
{
	MemberReference ref = node.getUserData(Keys.MEMBER_REFERENCE);
	
	// get the behavior entry
	ClassEntry classEntry =
		new ClassEntry(ref.getDeclaringType().getInternalName());
	BehaviorEntry behaviorEntry = null;
	if(ref instanceof MethodReference)
	{
		MethodReference methodRef = (MethodReference)ref;
		if(methodRef.isConstructor())
			behaviorEntry =
				new ConstructorEntry(classEntry, new Signature(
					ref.getErasedSignature()));
		else if(methodRef.isTypeInitializer())
			behaviorEntry = new ConstructorEntry(classEntry);
		else
			behaviorEntry =
				new MethodEntry(classEntry, ref.getName(), new Signature(
					ref.getErasedSignature()));
	}
	if(behaviorEntry != null)
	{
		// get the node for the token
		AstNode tokenNode = null;
		if(node.getTarget() instanceof MemberReferenceExpression)
			tokenNode =
				((MemberReferenceExpression)node.getTarget())
					.getMemberNameToken();
		else if(node.getTarget() instanceof SuperReferenceExpression)
			tokenNode = node.getTarget();
		else if(node.getTarget() instanceof ThisReferenceExpression)
			tokenNode = node.getTarget();
		if(tokenNode != null)
			index.addReference(tokenNode, behaviorEntry, m_behaviorEntry);
	}
	
	return recurse(node, index);
}
 
开发者ID:Wurst-Imperium,项目名称:Wurst-Enigma,代码行数:43,代码来源:SourceIndexBehaviorVisitor.java


注:本文中的com.strobel.assembler.metadata.MemberReference.getErasedSignature方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。