Skip to content

Commit

Permalink
Automated rollback of changelist 83458149.
Browse files Browse the repository at this point in the history
*** Original change description ***

Remove hard-coded versions of CharSequence and Comparable.
Untie J2ObjC_source from JreEmulation since it's set of includes can be reduced.

***
	Change on 2015/01/07 by kstanger <kstanger@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83461002
  • Loading branch information
kstanger authored and tomball committed Jan 29, 2015
1 parent f974c01 commit 832f192
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 74 deletions.
7 changes: 1 addition & 6 deletions jre_emul/Classes/J2ObjC_source.h
Expand Up @@ -15,11 +15,6 @@
#ifndef _J2OBJC_SOURCE_H_
#define _J2OBJC_SOURCE_H_

#import "J2ObjC_common.h"
#import "IOSObjectArray.h"
#import "IOSPrimitiveArray.h"
#import "IOSReflection.h"
#import "NSObject+JavaObject.h"
#import "NSString+JavaString.h"
#import "JreEmulation.h"

#endif // _J2OBJC_SOURCE_H_
1 change: 0 additions & 1 deletion jre_emul/Classes/JreEmulation.h
Expand Up @@ -24,7 +24,6 @@
#import "J2ObjC_common.h"
#import "JavaObject.h"
#import "JreMemDebug.h"
#import "IOSClass.h"
#import "IOSObjectArray.h"
#import "IOSPrimitiveArray.h"
#import "IOSReflection.h"
Expand Down
33 changes: 33 additions & 0 deletions jre_emul/Classes/java/lang/CharSequence.h
@@ -0,0 +1,33 @@
// Copyright 2011 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//
// CharSequence.h
// JreEmulation
//
// Created by tball on 10/18/11.
//

#import "JavaObject.h"

#ifndef JAVALANGCHARSEQUENCE_H
#define JAVALANGCHARSEQUENCE_H

@protocol JavaLangCharSequence < NSObject, JavaObject >
- (int)sequenceLength;
- (unichar)charAtWithInt:(int)index;
- (id<JavaLangCharSequence>)subSequenceFrom:(int)start to:(int)end;
@end

#endif /* JAVALANGCHARSEQUENCE_H */
31 changes: 31 additions & 0 deletions jre_emul/Classes/java/lang/Comparable.h
@@ -0,0 +1,31 @@
// Copyright 2011 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//
// Comparable.h
// JreEmulation
//
// Created by tball on 10/18/11.
//

#import "JavaObject.h"

#ifndef JAVALANGCOMPARABLE_H
#define JAVALANGCOMPARABLE_H

@protocol JavaLangComparable < NSObject, JavaObject >
- (int)compareToWithId:(id)another;
@end

#endif /* JAVALANGCOMPARABLE_H */

This file was deleted.

34 changes: 34 additions & 0 deletions jre_emul/stub_classes/java/lang/CharSequence.java
@@ -0,0 +1,34 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package java.lang;

/**
* Stub implementation of java.lang.CharSequence.
*
* @see java.lang.Object
*/
public interface CharSequence {

public int length();

public char charAt(int index);

public CharSequence subSequence(int start, int end);

public String toString();
}

0 comments on commit 832f192

Please sign in to comment.