private TypeReference getMostOuterTypeRef(TypeReference typeRef) { int maxDecraringDepth = typeRef.getFullName().split("(\\.|\\$)").length; for (int i = 0; i < maxDecraringDepth; i++) { TypeReference declaringTypeRef = typeRef.getDeclaringType(); if (declaringTypeRef == null) { break; } else { typeRef = declaringTypeRef; } } if (typeRef.getName().contains("$")) { return getMostOuterTypeRefBySlowLookuping(typeRef); } return typeRef; }
public String getFullName() { if (_fullName == null) { _fullName = _elementType.getFullName() + "[]"; } return _fullName; }
public String getFullName() { if (_fullName == null) { _fullName = _elementType.getFullName() + "[]"; } return _fullName; }
public String getFullName() { if (_fullName == null) { _fullName = super.getFullName(); } return _fullName; }
@Override public String getFullName() { if (_baseType != null) { return _baseType.getFullName(); } return _interfaces.get(0).getFullName(); }
private boolean typeNamesMatch(final TypeReference t1, final TypeReference t2) { return t1 != null && t2 != null && StringUtilities.equals(t1.getFullName(), t2.getFullName()); }
private boolean typeNamesMatch(final TypeReference t1, final TypeReference t2) { return t1 != null && t2 != null && StringUtilities.equals(t1.getFullName(), t2.getFullName()); }
public static RuntimeException notGenericType(final TypeReference type) { return new UnsupportedOperationException( format( "TypeReference '%s' is not a generic type.", type.getFullName() ) ); }
public static RuntimeException noElementType(final TypeReference type) { return new UnsupportedOperationException( format( "TypeReference '%s' does not have an element type.", type.getFullName() ) ); }
public static RuntimeException noElementType(final TypeReference type) { return new UnsupportedOperationException( format( "TypeReference '%s' does not have an element type.", type.getFullName() ) ); }
public static RuntimeException notWildcard(final TypeReference type) { throw new UnsupportedOperationException( format( "TypeReference '%s' is not a wildcard or captured type.", type.getFullName() ) ); }
public static RuntimeException notGenericType(final TypeReference type) { return new UnsupportedOperationException( format( "TypeReference '%s' is not a generic type.", type.getFullName() ) ); }
public static RuntimeException notGenericParameter(final TypeReference type) { return new UnsupportedOperationException( format( "TypeReference '%s' is not a generic parameter.", type.getFullName() ) ); }
public static RuntimeException notWildcard(final TypeReference type) { throw new UnsupportedOperationException( format( "TypeReference '%s' is not a wildcard or captured type.", type.getFullName() ) ); }
public static RuntimeException notGenericType(final TypeReference type) { return new UnsupportedOperationException( format( "TypeReference '%s' is not a generic type.", type.getFullName() ) ); }
private boolean typeNamesMatch(final TypeReference t1, final TypeReference t2) { return t1 != null && t2 != null && StringUtilities.equals(t1.getFullName(), t2.getFullName()); }
public static RuntimeException notBoundedType(final TypeReference type) { throw new UnsupportedOperationException( format( "TypeReference '%s' is not a bounded type.", type.getFullName() ) ); }
public static RuntimeException notGenericType(final TypeReference type) { return new UnsupportedOperationException( format( "TypeReference '%s' is not a generic type.", type.getFullName() ) ); }
@Override public String getFullName() { exitIfNeeded(); return _genericDefinition.getFullName(); }
public ImportDeclaration(final AstType type) { final TypeReference typeReference = VerifyArgument.notNull(type, "type").toTypeReference(); if (typeReference != null) { setImport(typeReference.getFullName()); putUserData(Keys.TYPE_REFERENCE, typeReference); } else { setImport(type.toString()); } }